|
-
Jan 9th, 2008, 02:49 PM
#1
Thread Starter
Frenzied Member
Context Menu - Multi Selected Files - One Instance
I created an item in the context menu of Window Explorer. I hooked the exe to:
HKEY_CLASSES_ROOT\*\SHELL
HKEY_CLASSES_ROOT\Directory\shell
HKEY_CLASSES_ROOT\Folder\shell
It works fine on single files!
Only problem is when I select multiple files, it runs multiple instance of the exe hooked to that context menu.
How can I make it so that it take in all selected files as parameters but only fires off the instance only once? Similar to a software called "Beyond Compare".
Does it have to do something with the registry - Reg_Multi_SZ with %1?
I'll Be Back!
T-1000
Microsoft .Net 2005
Microsoft Visual Basic 6
Prefer using API
-
Jan 9th, 2008, 03:41 PM
#2
Re: Context Menu - Multi Selected Files - One Instance
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Jan 9th, 2008, 04:52 PM
#3
Thread Starter
Frenzied Member
Re: Context Menu - Multi Selected Files - One Instance
What if the number of files being selected can vary - nth?
I'll Be Back!
T-1000
Microsoft .Net 2005
Microsoft Visual Basic 6
Prefer using API
-
Jan 10th, 2008, 12:37 PM
#4
Thread Starter
Frenzied Member
Re: Context Menu - Multi Selected Files - One Instance
 Originally Posted by westconn1
try %1 %2 %3 etc
According to this link that RobDogg provided:
http://msdn2.microsoft.com/en-us/lib...20(VS.85).aspx
%2 %3 %4 are backward compatibility for Window 3.1 for printers and other stuffs.
I'll Be Back!
T-1000
Microsoft .Net 2005
Microsoft Visual Basic 6
Prefer using API
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
|