-
hi I was just wondering something about be able to shell your program and make it start with a certain function, for example when you shell Regsvr32 and put the space and \u at the end to say unregister a active x control, is there a way to make your vb app shell so that a particular functin is executed? the reason I ask this is I want to add a file asociation to my app, but if I just put the path to my app it will just open my app as it would if they just doubled clicked the exe and not open the file with it.
-
The command line argument is represented by the Command statement with VB.
Code:
Private Sub Form_Load()
'This will open whatever file you type as the argument
Open Command For Input As #1
Text1 = Input(LOF(1), 1)
Close #1
End Sub
In the command prompt, you would write
Code:
MyApp C:\FileToOpen.txt
-
<?>
Code:
' if you put the shell of the file in the
' form load of your app your app opens and
' opens the file as well...
' here it opens notepad and try.txt
Private Sub Form_Load()
Shell "C:\WINDOWS\notepad.exe C:\try.txt", 1
End Sub