|
-
May 10th, 2001, 09:07 AM
#1
Passing command-line options to VB programs.
Hi, we are trying to write a Visual Basic program (version 6) and need some help with something that's probably really simple.
How do you pass command-line options in Win 9x (i.e., a path and file name) to a visual basic program? I know I'll shoot myself when I hear the answer.
Thanks.
-
May 10th, 2001, 09:26 AM
#2
yes you will! LOL
x = command
Parse x as you wish
-
May 10th, 2001, 09:27 AM
#3
Easy VB APP for ya.
Create a text box!
On form_load
text1.text=command
Thats all..you can see what passes through then.
-
May 10th, 2001, 09:50 AM
#4
Thanks bunches for the quick and accurate reply!
Bang!
(That's the sound of the gun going off)
hehehe
-
May 10th, 2001, 02:16 PM
#5
Tip: Use the Command internal variable in conjunction with the InStr function to see which parameters have been passed.
For example, if you want to see if an auto-run switch, such as -run, has been passed, then you can do something like:
Code:
if InStr(LCase(Command), "-run") then
Call RunMyFunction
end if
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|
Bookmarks