internet explorer - Is the command line used when opening a file from the browser? -
internet explorer - Is the command line used when opening a file from the browser? -
when utilize net explorer (or other browser) , seek download file, can little menu asks if "open or save" file. if click "open," command line run , there way me see or capture command line prompt in vb6 application?
for example, net explorer asks me if want open or save .abc file. click open. want myproject1.exe (written in vb6) read command line used open .abc file. (assuming file association exists between myproject1.exe , .abc extensions)
is possible?
you can read in command line arguments via command() function
try next test project:
'1 project with: ' 0 forms ' 1 module ' startup object in project properties should set sub main alternative explicit public sub main() dim intarg integer dim strcmd string dim strarg() string dim strshow string 'read command line strcmd = command if len(strcmd) > 0 'split command line on arguments strarg = split(strcmd, " ") 'show commandline arguments strshow = cstr(ubound(strarg) + 1) & " command line arguments :" intarg = 0 ubound(strarg) strshow = strshow & vbcrlf & "argument " & cstr(intarg) & " : " & strarg(intarg) next intarg msgbox strshow else msgbox "no command line arguments" end if end sub
compile project exe , phone call various command line arguments
when phone call .exe without command line arguments, show messagebox text "no command line arguments"
when phone call .exe command line arguments, show messagebox tells how many arguments there are, , are
now take exe when open file webbrowser, , have @ arguments
internet-explorer browser command-line vb6
Comments
Post a Comment