|
-
Sep 12th, 2000, 05:41 AM
#1
Thread Starter
Junior Member
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 ....
-
Sep 12th, 2000, 05:55 AM
#2
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
-
Sep 12th, 2000, 06:11 AM
#3
I've answered this question before have a look at this thread.
Good luck!
-
Sep 12th, 2000, 08:46 AM
#4
Thread Starter
Junior Member
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
-
Sep 12th, 2000, 08:53 AM
#5
Thread Starter
Junior Member
By the way, I tried to Command$, there seems to be nothing in it ??
Kleinvaag
-
Sep 12th, 2000, 09:04 AM
#6
transcendental analytic
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.
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Sep 12th, 2000, 09:25 AM
#7
Thread Starter
Junior Member
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 :-)
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
|