|
-
Jan 24th, 2000, 01:31 AM
#1
Thread Starter
Lively Member
when i right click a file and then open it then the command that windows gets is something like: notepad.exe %1, in which the %1 is the file that i clicked.
question, how can i use the %1 file in my visual basic program ?
-
Jan 24th, 2000, 01:42 AM
#2
Here is an example where the file is autoexec.bat
Code:
Dim RetVal As Integer
RetVal = Shell("C:\WINDOWS\NOTEPAD.EXE C:\AUTOEXEC.BAT", 1)
------------------
Marty
Why is it called lipstick if you can still move your lips?
-
Jan 24th, 2000, 01:42 AM
#3
Junior Member
put this code in the load form of ur vb app.
code:
if command$ <> "" then msgbox command$
'then when u got ur program, edit the reg
' eg. C:\myapp.exe %1
-
Jan 24th, 2000, 01:47 AM
#4
Thread Starter
Lively Member
i surely did not ask the right questiuon...
i right click a file(any file)
and choose - something, (i can put my program to run from the right click menu)
i want that my program will run and inside, use the file that i clicked . . . how do i do that ?
-
Jan 24th, 2000, 01:59 AM
#5
Junior Member
say u want to make ur own text editor??
use the above code to get the file when it is right clicked on. Once u have the file, do what ever u want to do wif it - then edit the reg
HKEY_CLASSES_ROOT\txtfile\shell\open\command
and put the name of ur app followed by the %1
eg. C:\myapp.exe %1
contact me for any further queries
ICQ: 29792493
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
|