|
-
Jul 28th, 2000, 07:14 AM
#1
Thread Starter
Addicted Member
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.
-
Jul 28th, 2000, 08:04 AM
#2
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
-
Jul 28th, 2000, 08:42 AM
#3
_______
<?>
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
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
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
|