943,621 Members | Top Members by Rank

Ad:
Apr 8th, 2007
0

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

Expand 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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
john99 is offline Offline
4 posts
since Apr 2007
Apr 9th, 2007
0

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

Does this help?
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Dim TaskID As Long
  2. TaskID = Shell(pathname\filename.exe, vbNormalFocus)
Reputation Points: 26
Solved Threads: 5
Junior Poster
scudzilla is offline Offline
191 posts
since Mar 2007
Apr 10th, 2007
0

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

Click to Expand / Collapse  Quote originally posted by john99 ...
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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
bitbucket is offline Offline
3 posts
since Sep 2006

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: How do I find the path of my VB program at run time
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Need code for macro to paste cells into only visible cells





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC