|
#1
|
|||
|
|||
|
Trouble with shell statement VB 2008
Can you help me please?
I am trying to launch one program (written by me) from another. I have done it before and it worked fine, but not now. The program runs and seems to have the focus* but it is not displayed. * It appears on the task bar and is highlighted. If I press alt + tab TWICE the form is displayed. To trouble shoot I have written two simple apps. The launcher Code:
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Shell("C:\Documents and Settings\steve\My Documents\vb\2008\tests\loading_test\loading_test\bin\Release\loading_test.exe")
End Sub
End Class
And the Target (loading_test.exe) program-just a blank form. If I double click on the target .exe file it works fine. Any advice would be welcome. Thanks, Steve |
|
#2
|
||||
|
||||
|
You don't need to use Shell in the .NET world. Try this.
Code:
System.Diagnostics.Process.Start("C:\Documents and Settings\steve\My Documents\vb\2008\tests\loading_test\loading_test\bin\Release\loading_test.exe")
__________________
I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section. ![]() Please use [Code]your code goes in here[/Code] tags when posting code. Before posting your question, did you look here? Got a question on Linux? Visit our Linux sister site. Modifications Required For VB6 Apps To Work On Vista ![]() Good Article: Language Enhancements In Visual Basic 2010 Upgrading VB6 Code To VB.NET Microsoft MVP 2005/2006/2007/2008/2009/2010 |
|
#3
|
|||
|
|||
|
Thanks Hack, it works great.It's easy when you know how!
Steve |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Debugging VB 2008 Code / Line Turns Gray | bgibson | .NET | 6 | 11-12-2008 12:43 PM |
| More on Visual J#.Net | Jim Pragit | .NET | 64 | 10-20-2001 08:06 PM |
| The day that everything went wrong!!! | WHYVB? | .NET | 0 | 10-03-2001 09:14 AM |
| If statement in VB Script | Dana Riley | ASP.NET | 2 | 10-08-2000 02:58 AM |
| embedding vb in href statement | Craig | VB Classic | 0 | 07-05-2000 04:46 PM |