How do I use a command button to open a exe file created in VB?

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved

Join Date: Apr 2007
Posts: 4
Reputation: john99 is an unknown quantity at this point 
Solved Threads: 0
john99 john99 is offline Offline
Newbie Poster

How do I use a command button to open a exe file created in VB?

 
0
  #1
Apr 8th, 2007
Hi everyone

I am relearning to use VB after taking classes almost 10 years ago. I am stumped on remebering how to open a file using a command button.

I have created some forms using VB that I want to activate from a main menu. I have made them .exe files and just want to navigate from one to another.

Thanks - John
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 181
Reputation: scudzilla is an unknown quantity at this point 
Solved Threads: 3
scudzilla's Avatar
scudzilla scudzilla is offline Offline
Junior Poster

Re: How do I use a command button to open a exe file created in VB?

 
0
  #2
Apr 9th, 2007
Does this help?
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Dim TaskID As Long
  2. TaskID = Shell(pathname\filename.exe, vbNormalFocus)
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 3
Reputation: bitbucket is an unknown quantity at this point 
Solved Threads: 0
bitbucket bitbucket is offline Offline
Newbie Poster

Re: How do I use a command button to open a exe file created in VB?

 
0
  #3
Apr 10th, 2007
Originally Posted by john99 View Post
Hi everyone

I am relearning to use VB after taking classes almost 10 years ago. I am stumped on remebering how to open a file using a command button.

I have created some forms using VB that I want to activate from a main menu. I have made them .exe files and just want to navigate from one to another.

Thanks - John
Assume you are using VB 6 ... use the online help or MSDN and look up SHELL command ... but why did you make the forms into separate exe files? Using your main menu form you could code:

IF someoption is selected then
LOAD frm_name
frm_name.SHOW
Endif
the above will bring the form up and it will have the focus... now for some finesse in the new form's LOAD subroutine

main_menu_form.HIDE

in the new forms Query_Unload sub

main_menu.shw
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum


Views: 4727 | Replies: 2
Thread Tools Search this Thread



Tag cloud for Visual Basic 4 / 5 / 6
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC