943,712 Members | Top Members by Rank

Ad:
Sep 21st, 2005
0

Command Prompt and Visual Basic

Expand Post »
I was wondering if it was possible for me to write a simple program that either lets you use command prompt with visual basic (i.e. press a button and it does a command in CMD) if it can't be done in VB is there any other programming languages that allow me to do this. Thanks.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
tom_h_500 is offline Offline
46 posts
since Sep 2004
Sep 21st, 2005
0

Re: Command Prompt and Visual Basic

Quite possible by using ShellExecute with lpFile="cmd.exe" and lpParameters="/c <your command here>" (can be also "/k", just read the cmd.exe help).
Last edited by Alvein; Sep 21st, 2005 at 7:55 pm. Reason: doh
Reputation Points: 12
Solved Threads: 4
Junior Poster
Alvein is offline Offline
104 posts
since Jul 2005
Sep 22nd, 2005
0

Re: Command Prompt and Visual Basic

shell "cmd.exe /c"

will get you to the comamnd prompt. Shellexecute will give you more options and handling and return values, but if you just need the prompt, there you go.
Reputation Points: 20
Solved Threads: 5
Junior Poster
jwshepherd is offline Offline
123 posts
since Jun 2005

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: Adding pictures
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Another problem.





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


Follow us on Twitter


© 2011 DaniWeb® LLC