Create Item In Explorer Context Menu And Then Retrieve Path To Active Folder?
Aug 11, 2011
Using VB 2010 Express, I will try to explain what I want to achieve:1. The user installs my program.2. In an Explorer window (Vista/Win7) the user will right click any file.3. The program checks if there is an item called "MyApp" in the context menu (i.e. the menu with for instance the "Open with..." item). If not, then create the "MyApp" item which launches "TheRealApp.exe" that the user installed. Place the item after the "Print" item.
View 1 Replies
ADVERTISEMENT
May 15, 2010
VB express 2008 .net 3.5 or .net 4.0 VB express 2010?I have written application to convert RTF to HTML. The main Purpose of the application is to copy VS code to the clipboard and covert it then put it back into the clipboard as a HTML Document so that it can be pasted into a HTML document such as Windows Live Mail. I found that code copied and pasted is spaced out in in the wrong positions.
The applications works perfect with no bugs so far. I then asked Myself how to go about doing the copy with the least amount of operator interaction. So I added an Icon to the Icon Tray with a right click menu to use to convert once the Rich Text Format was copied to the clipboard. This works fine except you have Five steps, Select the text, Copy to clipboard, Right Click the icon, Select the Converter and Paste. The normal is three steps.
To this the best solution is to add a context menu item to the active form such as the RTF editor or window. So that when you select the Rich Text to copy and right click on the form to bring up that menu then to Just Select the menu Item such as "Copy RT and Convert" I searched and found about 544000 Items and tried to restrict down to no avail. I read until I finally gave up. I did not find any code examples of this. Almost every thing I found related to the web or some other explicit document like Excel and not to the Various windows that could be active with RT in it.
how do you add a context menu item to the context menu of an active rich text format window such as WordPad or VB?I have test in my application that tests to see if it is a RTF in the clipboard so if it is not the converter does nothing.
Imports System.Threading
Imports System.IO
Imports System
[code]....
View 8 Replies
Nov 21, 2011
I want to add an option to the explorer context menu that appears whenever a user right clicks on a folder or drive. So I add the following reg key:
HKEY_CLASSES_ROOTFoldershellMyProgramcommand
"(Default)" value within is set to:
C:MyProgram.exe "%1"
and all works fine for folders, the %1 gets expanded to the relevant folder path that the user clicked on. However, when right clicking on a drive (e.g C drive in My Computer) the fact that the path then has a trailing backslash seems to seems to mess things up as the backslash acts as an escape character and makes the last quote mark get passed in as part of the command line (and the backslash is removed completely).For example if the following command is called from a context menu generated by the user right clicking on their C drive: "MyProgram.exe" "%1" You would expect the final command line to be this:MyProgram.exe C:But what actually happens is this: MyProgram.exe C:" I can add a backslash in manually (e.g "%1") but then it works fine for drives and not for folders.
View 5 Replies
Mar 27, 2009
How can add item to Windows Explorer context menu ?
View 1 Replies
Jun 24, 2009
how can i add an item to the windows explorer context menu, that will only be enabled when the user right clicks a .zip file? also, how do i handle that items click event?
View 5 Replies
Jun 24, 2009
how can i add an item to the windows explorer context menu, that will only be enabled when the user right clicks a .zip file? also, how do i handle that items click event?
View 5 Replies
Aug 14, 2011
I can only get the path to the folder where my application is located. How can I get the path to the active Explorer folder?
View 4 Replies
Feb 24, 2012
I'm trying to assign a link to a VBScript into a context menu in the Contents area of File Explorer. What I want is to be able to right-click in the white-space there and see my program listed in the context specific menu but I don't want it showing when users right-click on any of the folders in either the folders area or the contents area.
View 4 Replies
Sep 4, 2010
i used the code below to register a menu item in the Explorer context menu. Aldo this works just fine there is one problem with it. When i select multiple files and then press the button my application is fired up multiple times. Now what i would like is to it to be fired once and then pass on the multiple files that where selected..
Code:
''' <summary>
'''
[code]......
View 5 Replies
Apr 27, 2009
I have the code below to access Folder when i right click any folder in windows explorer, it works. My question is i want to add icon to the context menu name like winzip or winrar [code]...
View 5 Replies
Aug 14, 2009
I want to add an item to the computers context menu, I want that item to have an image and to have sub items.
View 1 Replies
Apr 19, 2009
how to add a context menu to the Windows Explorer for particular file or all files.
View 6 Replies
Jul 21, 2010
VS 2005 how to add a context menu to the Windows Explorer
View 1 Replies
Jun 22, 2009
i want to show context menu on drop down menu item right click...As an example,Suppose we add bookmark in mozilla & when we right click on that item..context menu is showing
Code:
Private Sub MenuAddToFavorites_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MenuAddToFavorites.MouseDown
If e.Button = Windows.Forms.MouseButtons.Right Then
[Code]......
View 5 Replies
Jan 13, 2010
I want to use this function in my program
EnableMenuItem Function - [URL}
how to use it, i am trying to edit right click explorer context menu
View 4 Replies
Jul 21, 2011
I want to be able to add only a certain context menu to Windows Explorer when a condition is met, that is, when a folder is right click, I should be only add the context menu if that folder is in a certain state.
View 1 Replies
Jul 21, 2010
I have developed a window application in VB.Net now i want to add my executables to the windows explorer right click menu.so that whenever user right clicks on any folder or any file then in the menu litst mu application executables should be there.How do i achieve this in the vb.net.
View 1 Replies
Dec 26, 2010
This is not strictly .net code question but I have a project that i want to open from a folder(not file) context menu and pass the folder path to my program like open with but this is not visiable from a folder.
View 2 Replies
May 21, 2009
how to delete a item from the context menu.. i can add a item with this code:
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
ContextMenuStrip4.Items.Add("delete file")
End Sub
no problem there. and to delete this item, i figured since it is the 4th item in the contextmenu (and i can't type the "delete file" either w/o error) it would delete it by index, with this code:
Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
ContextMenuStrip4.Items.Remove(3)
End Sub
the (3) is giving me a error "value of type 'interger' cannot be converted to 'system.windows.forms.toolstripmenu'".. i think that means that the context menu does not support indexing.
View 2 Replies
Sep 8, 2009
How do you add an item to the system context menu? I would like to let my users be able to right click anywhere and launch this program. I cannot seem to find it documented anywhere either.
View 1 Replies
Feb 12, 2012
I want to add a context menu to a datagrid in VB2008 and I need to find out which menu item the user selected.
I don't want to use the ContextMenuStrip that's available in the toolbox since it doesn't allow for dynamic placement depending on what row is active in the grid (I haven't found a Top and Left property in the ContextMenuStrip)
Here's what I've got so far, I'm aware of the fact that the MsgBox uses a non-existing property, it is meant to show my intention.
Given the available properties in the ContextMenu object, I would think that there would be something like a SelectedItemCaption property but a search of the object tree yields no results.
dim grdContextMenu as ContextMenu
grdContextMenu = New ContextMenu
grdContextMenu.MenuItems.Add("Insert")
[Code].....
View 3 Replies
Oct 22, 2008
I want to retrieve a folder path when I right click on a folder with the mouse. If I use
Code:
FileIO.FileSystem.CurrentDirectory
then i only get the current folder and not including the folder I right click on...
Is it possible to retrive this path?
View 18 Replies
Aug 30, 2009
How can I assign a context menu strip to a listbox item and not the listbox itself?
View 1 Replies
Jul 2, 2009
I have a context menu strip (named cmnuRtxtIT) that pops up by right clicking on top of a rich text box in a VB 2008 WinForms application. Context menu strip cmnuRtxtIT has one item named ToolStripMenuInsertFld. This last one has one dropdown item named oolStripComboBoxFlds which is a ToolStripComboBox type. I do the following in the form's Load event to bind ToolStripComboBoxFldsto an Sql database:
Dim dt As New DataTable
Dim dta As New SqlDataAdapter("SELECT pkID, txtFlds FROM ApplicationFields", goConn)
dta.Fill(dt)
[code].....
View 6 Replies
Oct 6, 2009
Visual Studio 2005. Is there a way to determine which menu item is hi-lited in a ContextMenuStrip?
For example: I associate ContextMenuStrip1 with TextBox1.ContextMenuStrip1 contains 5 items with names:
Item1ToolStripMenuItem
Item2ToolStripMenuItem
Item3ToolStripMenuItem
Item4ToolStripMenuItem
Item5ToolStripMenuItem
A sub-menu is created with Item3ToolStripMenuItem that contains 5 items with names:
Item3aToolStripMenuItem
Item3bToolStripMenuItem
Item3cToolStripMenuItem
Item3dToolStripMenuItem
Item3eToolStripMenuItem
As the menu is navigated is there a way for the program to know which of the 10 menu items is hi-lited before a click event occurs?
View 4 Replies
May 21, 2009
This is somewhat related to my other thread, but because it's a different question and the other answer has been marked I thought this should be posted in it's own thread.I have this code another poster had written for me:
Private _MenuCloseing
Private _SecondsRemaining As Long = 10
Private WithEvents _Timer As New Timers.Timer(100)
[code].....
View 1 Replies
Jan 17, 2011
Is it possible to be present a context menu when an item, any item, is right clicked in the ListView control? - If so, how?
View 5 Replies
Jul 13, 2010
If cmOptions.Visible Then
Return
End If
I have a refreshing process that updates a listview every ten seconds. If the context menu is open for a selected item it should return and not refresh?
View 1 Replies
Apr 7, 2010
i want to put a menu item for my application to the right click menu of windows explorer.I do not want to do it programmatically but i want to do it with the .NET installer.Until now i have found that i have to insert into the registry the following keys:
HKEY_CLASSES_ROOT/*/shell/MyApplication/command
and i have to put there a new value of
"[TARGETDIR]MyApplication.exe" "-file=%1"
The problem is that i want to be able to select multiple files and then call my application with parameter all of these files.Now when i right click with many selected files my application is run for each file sepparately.I want to run my application only once and with an input parameter of all the files that are selected.Also until now i cannot add a value to the (Default) key. It only adds a new value to the registry...Also i want to be able to do the same thing with folders...
View 9 Replies
Mar 28, 2012
I've got a dynamically filled datagrid view. When a user right clicks a cell in the datagridview, it opens a context menu, located by that cell. The context menu has two choices: A and B. I want to set the value of the cell to A if they pick A, and B if they pick B.I would like to pass the relevant cell as a field in the event args passed to ContextMenu's ToolStripItem.click. So the handler for ToolStripItem A's click event would read the relevant cell from the event args and set it to A , like this...
Private Sub A_Click(ByVal sender As System.Object, ByVal e As Customized System.EventArgs) Handles A.Click
e.relevantCell.Value=A
End Sub
how to pass a custom event arg. Or if there is some easier way to do this? I can't just use the X and Y coordinates, because the context menu/mouse won't necessary by over the relevant cell.
View 2 Replies