View Single Post
  #1 (permalink)  
Old 01-07-2009, 4:05 PM
Steve36445 Steve36445 is offline
VB.NET Forum Enthusiast
.NET Framework: .NET 3.0 (VS 2005/2008)
 
Join Date: Dec 2007
Posts: 41
Reputation: 30
Steve36445 is on a distinguished programming path ahead
Default 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
The path is correct and I have tried the target file in both the debug and publish directories as well as in the route dirctory of the launching program.



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
Reply With Quote