473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Context menu application to act on selected files.

Hi all,

I want to write an application that is launched from the context menu
in Windows Explorer/Computer. That is to say, when I am browsing
around my hard drive and get to any location I choose, I want to be
able to select several files, right click my mouse and launch an
application which will act on the selected files.

However, I don't even know where to start and have a number of
questions!

How do I get the list of files to pass into the application? Is this
done on the Command line and if it is, how do I pass the names of the
selected files into it? I've seen "%1" etc thrown about but don't
understand it. Also is it possible to pass the folder the files are in
to the application so any edited files can be saved to the same
location of a dynamically created folder within the launch one?

Also, how do I get the application to create a context menu item when
it installs? I've never created this kind of application before (one
that launches from the context menu) and have no idea how to do this.
I'm sure Ill have many more questions, but these will do for now and
should get me off the ground.

Thanks

Nov 7 '07 #1
4 4174
Google "adding context menu to windows explorer"

"Karl" <go**********@cortexa.co.ukwrote in message
news:11**********************@d55g2000hsg.googlegr oups.com...
Hi all,

I want to write an application that is launched from the context menu
in Windows Explorer/Computer. That is to say, when I am browsing
around my hard drive and get to any location I choose, I want to be
able to select several files, right click my mouse and launch an
application which will act on the selected files.

However, I don't even know where to start and have a number of
questions!

How do I get the list of files to pass into the application? Is this
done on the Command line and if it is, how do I pass the names of the
selected files into it? I've seen "%1" etc thrown about but don't
understand it. Also is it possible to pass the folder the files are in
to the application so any edited files can be saved to the same
location of a dynamically created folder within the launch one?

Also, how do I get the application to create a context menu item when
it installs? I've never created this kind of application before (one
that launches from the context menu) and have no idea how to do this.
I'm sure Ill have many more questions, but these will do for now and
should get me off the ground.

Thanks

Nov 7 '07 #2
On 7 Nov, 21:32, "Ashot Geodakov" <a_geoda...@nospam.hotmail.com>
wrote:
Google "adding context menu to windows explorer"

"Karl" <googlegro...@cortexa.co.ukwrote in message

news:11**********************@d55g2000hsg.googlegr oups.com...
Hi all,
I want to write an application that is launched from the context menu
in Windows Explorer/Computer. That is to say, when I am browsing
around my hard drive and get to any location I choose, I want to be
able to select several files, right click my mouse and launch an
application which will act on the selected files.
However, I don't even know where to start and have a number of
questions!
How do I get the list of files to pass into the application? Is this
done on the Command line and if it is, how do I pass the names of the
selected files into it? I've seen "%1" etc thrown about but don't
understand it. Also is it possible to pass the folder the files are in
to the application so any edited files can be saved to the same
location of a dynamically created folder within the launch one?
Also, how do I get the application to create a context menu item when
it installs? I've never created this kind of application before (one
that launches from the context menu) and have no idea how to do this.
I'm sure Ill have many more questions, but these will do for now and
should get me off the ground.
Thanks
Thanks Ashot, Im going to look into this shortly. I'd like to know how
I create an install for my app that would write such a registry entry
relevant to the install location of the app.

In the meantime, I've started to write my app and have managed to get
it to launch and take command line parameters or arguments, but need
to be able to capture the folder windows explorer is browsed to. All
I'm getting at the moment, is the location of the exe file and a list
of the parameters. Remember Im trying to act on selected files and
save them back to their original location. How do I do this? Just had
a thought as I'm writing... would this be captured in "%1" when the
app is launched via the context menu?

Thanks for your help again...
Karl

Nov 10 '07 #3
On 7 Nov, 21:32, "Ashot Geodakov" <a_geoda...@nospam.hotmail.com>
wrote:
Google "adding context menu to windows explorer"

"Karl" <googlegro...@cortexa.co.ukwrote in message

news:11**********************@d55g2000hsg.googlegr oups.com...
Hi all,
I want to write an application that is launched from the context menu
in Windows Explorer/Computer. That is to say, when I am browsing
around my hard drive and get to any location I choose, I want to be
able to select several files, right click my mouse and launch an
application which will act on the selected files.
However, I don't even know where to start and have a number of
questions!
How do I get the list of files to pass into the application? Is this
done on the Command line and if it is, how do I pass the names of the
selected files into it? I've seen "%1" etc thrown about but don't
understand it. Also is it possible to pass the folder the files are in
to the application so any edited files can be saved to the same
location of a dynamically created folder within the launch one?
Also, how do I get the application to create a context menu item when
it installs? I've never created this kind of application before (one
that launches from the context menu) and have no idea how to do this.
I'm sure Ill have many more questions, but these will do for now and
should get me off the ground.
Thanks
I was playing around with some code samples I found online yesterday
regarding adding context menus and found one that seems to appear in
the context menu when you right click on a folder. However, I need to
have a context menu when I right click on image files (pref jpg/jpeg
and if poss gifs) Are there any samples of how to add context menus to
specific file types?

Thanks again.

Nov 10 '07 #4
On 10 Nov, 12:18, Karl <googlegro...@cortexa.co.ukwrote:
On 7 Nov, 21:32, "Ashot Geodakov" <a_geoda...@nospam.hotmail.com>
wrote:
Google "adding context menu to windows explorer"
"Karl" <googlegro...@cortexa.co.ukwrote in message
news:11**********************@d55g2000hsg.googlegr oups.com...
Hi all,
I want to write an application that is launched from the context menu
in Windows Explorer/Computer. That is to say, when I am browsing
around my hard drive and get to any location I choose, I want to be
able to select several files, right click my mouse and launch an
application which will act on the selected files.
However, I don't even know where to start and have a number of
questions!
How do I get the list of files to pass into the application? Is this
done on the Command line and if it is, how do I pass the names of the
selected files into it? I've seen "%1" etc thrown about but don't
understand it. Also is it possible to pass the folder the files are in
to the application so any edited files can be saved to the same
location of a dynamically created folder within the launch one?
Also, how do I get the application to create a context menu item when
it installs? I've never created this kind of application before (one
that launches from the context menu) and have no idea how to do this.
I'm sure Ill have many more questions, but these will do for now and
should get me off the ground.
Thanks

I was playing around with some code samples I found online yesterday
regarding adding context menus and found one that seems to appear in
the context menu when you right click on a folder. However, I need to
have a context menu when I right click on image files (pref jpg/jpeg
and if poss gifs) Are there any samples of how to add context menus to
specific file types?

Thanks again.
Does anyone know where I can find examples of this?
Thanks again.
Nov 22 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Mohit Gupta | last post by:
Hi all, Lately I have been working on an application in VB .net CF for Pocket PC device. I have a small question about Context Menu. When I try to close the window after context menu is poped...
0
by: Roman Muntyanu | last post by:
Hi all, I wrote add-in that can do different job for files with different extension. When I do right click on the file I see all my custom menuItems in context menu of solution explorer for all...
5
by: yxq | last post by:
Hi I am build vb6 Context menu extension, but how to determine which popup menu item(popupItem1 and popupItem2) was clicked? Thanks The code ' ' IContextMenu::QueryContextMenu '
5
by: lgbjr | last post by:
Hello All, I have several Pictureboxes (linked to an AccessDB) on a VB.NET form. I would like to use a context menu to allow the user to open the picture in their default picture viewer or...
2
by: Doug Bell | last post by:
Hi, I would like to add a Menu Item to the Explorer Context Menu so that when the User Right Clicks on a File, they are given a choice to launch my application with the selected file passed as a...
2
by: gilad | last post by:
Hi, I seem to be having a problem getting a context menu to work in Explorer. The menu item installs fine, but when I click it a message box should pop up indicating the command was received and...
2
by: travelrats | last post by:
Hi Here's my problem - I've been trying to figure this out for a while and ran out of ideas... <div> id1 contains <div> id2 (a geographical map) <div> id2 contains a context menu made out of...
2
by: jamil | last post by:
I have a tab control on a form with several tab pages. I have also added a context menu to the tab control that contains a couple of menu items-- Add and Delete. What I would like to do is...
3
by: Gary | last post by:
Hi all, I am writing an application which will intake arguments of filenames for processing: e.g. MyApp.exe "C:\abc.txt" "C:\def.doc" - then, MyApp will process the 2 files by parsing the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.