|
-
Sep 8th, 2000, 05:06 PM
#1
Thread Starter
New Member
In the same way that (when writing) you can forget how to spell the simplest of words...
I've completely forgotten how to retrieve command line arguments passed when the application is started. So, if myapp.exe is executed like this...
c:\myapp\myapp.exe /hello
...how on earth do I retrieve the "/hello" bit in code?
This is easy - I've done it before! I've just completely forgotten how!
Yours,
Matt
-
Sep 8th, 2000, 05:10 PM
#2
Use the Command keyword.
Code:
Private Sub Form_Load()
MsgBox Command$
End Sub
-
Sep 8th, 2000, 05:15 PM
#3
Dim CommandLine as String
Dim SubC1 as Integer
CommandLine = Command$
'Get command line.
SubC1 = InStr(1, CommandLine, "/hello", vbTextCompare)
If SubC1 <> 0 Then
'commandline contains /hello
'do the rest of your stuff
End If
hope it helps,
larryn
-
Sep 8th, 2000, 05:28 PM
#4
Thread Starter
New Member
Fabulous - cheers chaps.
(/rolls eyes not believing his own stupidity)
-
Sep 8th, 2000, 10:24 PM
#5
Hyperactive Member
here's a website with it.
it even has the html names there
http://www.bbsinc.com/iso8859.html
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
|
Click Here to Expand Forum to Full Width
|