Leeus Posted April 4, 2003 Posted April 4, 2003 Hi all, in VB6 it was easy to pick up stuff from the command line to my exe. I would use for example "test.exe 2254 1145748" and use the command function to retrieve them, this is not a console application and is a windows app in VB.net, how is it done??? Many thanks! Quote
*Gurus* divil Posted April 4, 2003 *Gurus* Posted April 4, 2003 Environment.CommandLine Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
a_jam_sandwich Posted April 4, 2003 Posted April 4, 2003 Also if you need to split the arguments use Environment.GetCommandLineArgs GetCommandLineArgs is a Array E.g. RUN.EXE param1 param2 Environment.GetCommandLineArgs(0) Will return param1 Environment.GetCommandLineArgs(1) Will return param2 Andy Quote Code today gone tomorrow!
Leeus Posted April 4, 2003 Author Posted April 4, 2003 Sorry how do I access them directly? A bit more code if necessary? Quote
a_jam_sandwich Posted April 4, 2003 Posted April 4, 2003 Msgbox("When you opened this program you gave the parameters " & environment.commandline) Thats it nice and simple :) Andy Quote Code today gone tomorrow!
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.