y abrirlos diréctamente usando el click izquierdo dle ratón.
RichTextboxLinks > http://www.codeproject.com/Articles/9196/Links-with-arbitrary-text-in-a-RichTextBox
Lo que quiero hacer es abrir los filelinks con el click derecho en lugar de usar click izquierdo, y quiero que antes se muestre un menú contextual para seleccionar la acción a realizar,
el menú contextual contiene estos dos elementos:
1. Open file in explorer
2. Open file with...
El problema es que no tengo ni idea de como hacerlo. he intentado añadir el handle del evento junto al contextmenu pero me dice que la firma es incompatible para el handle del "InsertLink".
Este es el sub que tengo y que maneja el evento cuando un "FileLink" se clicka con el botón izquierdo dle ratón:
(e.LinkText contiene el text del FileLink)
Código
' This event happens when a FileLink is clicked Private Sub results_box_LinkClicked_1(sender As Object, e As LinkClickedEventArgs) Handles results_box.LinkClicked ' I can't add here a handle for the contextmenu: "results_box.ContextMenu" but anyway I don't know if that is the way to do it NewMenu.show ' Dim FileInformation = My.Computer.FileSystem.GetFileInfo(e.LinkText) ' Process.Start("explorer.exe", " /select," & FileInformation.DirectoryName & "\" & FileInformation.Name) End Sub
PD: Más info aquí: http://stackoverflow.com/questions/13994639/contextmenu-in-a-richtextbox-for-open-a-filelink#comment19317914_13994639
