-
I have a tricky one for all of you :
I want to add a command to the shell that pop up's when you right-click a file in the windows explorer( e.g. like winzip does that).
I want to have the option, that if you right click a folder or file in the windows explorer, you can start up my program.
The second question is that if you click on 'my program' i want to pass the data of the folder/file-name to 'my program'
Anyone got any suggestions ??
I'm lost ....
-
To let the proggie accept that sort of opening, you need to use the Command$ variable that contains a string of everythying that was passed in to you proggie at startup time.
Therefore, you would check the Command$ var in Sub Main and see if it contained a filename. If it did, then call your load function or whatever function you need to passignthe command line var to it eg:
Code:
Dim strFile as String
strFile = Command$
LoadFile strFile
or something similar.
- gaffa
-
I've answered this question before have a look at this thread.
Good luck!
-
Thx for the quick reply.
The registry part works :-)
It's now in the shell-menu.
Question 2 :
How do I pass the folder/file-name to my program ?
I want it to start up with the folder where my program is started from ....
Any suggestions ??
Kleinvaag
-
By the way, I tried to Command$, there seems to be nothing in it ??
Kleinvaag
-
In registry, you've put the default value of the command key ending with a " %1" right? Should work if you lauch your app by rightclicking that file in explorer on that command in the context menu.
-
Thx a lot.
I didn't had the %1 ...
It workds fine now.
Thx Again,
You've been a big help ....
Kleinvaag
See you .......... at my next question :-)