![]() |
Click here to advertise with us
|
|
|||||||
| Menus & Toolbars Discussion of menu and toolbar components |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
What i would like to do is have my application add a entry to the main windows context menu(for when i right click a picture) which will be called host image.
My question is what do i need to read up on to add a context menu entry When the entry is clicked i want it to get the file it's clicked on location Does this make some sort of sense to you? |
|
||||
|
[ame=http://www.google.com.au/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=ErY&q=shell+extension+.net&btnG=S earch&meta=]shell extension .net - Google Search[/ame]
It looks like it's easier to find C# examples so you might need to convert some code. I recommend Instant VB.
__________________
![]() 2007, 2008, 2009, 2010 Why is my data not saved to my database? | Communicating between multiple forms MSDN: Data Walkthroughs | "How Do I?" Videos My Blog: Custom Events | Dynamic GDI+ Drawing |
|
|||
|
Right, i found a project to convert to vb.net.
it adds a entry and lets you select what exe to run when click. My question is, I need to capture the file it was right clicked on, so when my application runs it knows what file to work with. is this difficult? |
|
||||
|
Most likely this info will be available in command line arguments. I don't know if registry path has to be modified in your case, often a %1 is appended.
In applications Startup event you can find this in e.CommandLine. It is also found in My.Application.CommandLineArgs or Environment.GetCommandLineArgs.
__________________
Some useful links: Learning videoes, Code Samples, WMI Code Creator, MSDN, The Code Project, WindowsClient.net, ASP.net, W3 Schools, Regular-Expressions.info, GDI+ FAQ
How to format posts with code blocks etc - present the problem/post properly ![]() |
|
||||
|
If your Reg entry says "MyApp.exe %1" then, when the user clicks MyFile.txt then Windows executes the commandline "MyApp.exe MyFile.txt" and, in your app, Environment.GetCommandLineArgs returns the array {"MyApp.exe", "MyFile.txt"}. Easy.
__________________
![]() 2007, 2008, 2009, 2010 Why is my data not saved to my database? | Communicating between multiple forms MSDN: Data Walkthroughs | "How Do I?" Videos My Blog: Custom Events | Dynamic GDI+ Drawing |
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|