-
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
-
Use the Command keyword.
Code:
Private Sub Form_Load()
MsgBox Command$
End Sub
-
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
-
Fabulous - cheers chaps.
(/rolls eyes not believing his own stupidity)
-
here's a website with it.
it even has the html names there
http://www.bbsinc.com/iso8859.html