Top DevX Stories
Top 6 Tips for Agile Testing
Adobe Buys Day Software to Bolster ECM Portfolio
Useful UML Modeling: Two of a Kind
Programming, Development Skills in Demand
Cloud Working Group Developing Standard APIs
Search the forums:

Go Back   DevX.com Forums > DevX Developer Forums > .NET

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 01-07-2009, 04:01 PM
Steve36445 Steve36445 is offline
Registered User
 
Join Date: Jul 2007
Posts: 133
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
  #2  
Old 01-08-2009, 07:46 AM
Hack's Avatar
Hack Hack is offline
Super Moderator
 
Join Date: Apr 2007
Location: Sterling Heights, Michigan
Posts: 8,212
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
Reply With Quote
  #3  
Old 01-08-2009, 08:08 AM
Steve36445 Steve36445 is offline
Registered User
 
Join Date: Jul 2007
Posts: 133
Thanks Hack, it works great.It's easy when you know how!

Steve
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT -4. The time now is 01:13 PM.


Sponsored Links



Acceptable Use Policy

Internet.com
The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.