Skip to content

Instantly share code, notes, and snippets.

@JPeroutek
Created July 1, 2014 14:16
Show Gist options
  • Save JPeroutek/e179a3414eac3bd3294e to your computer and use it in GitHub Desktop.
Save JPeroutek/e179a3414eac3bd3294e to your computer and use it in GitHub Desktop.
fileControlRightClicked 7/1/2014
Sub fileControlRightClicked(ByVal sender As System.Windows.Forms.RichTextBox, ByVal e As System.Windows.Forms.MouseEventArgs)
If e.Button <> Windows.Forms.MouseButtons.Right Then Return
Dim cms = New ContextMenuStrip
'cms.Parent = sender
Dim item1 = cms.Items.Add("Select File")
item1.Tag = 1
AddHandler item1.Click, AddressOf openFileDialog
cms.Show(sender, e.Location)
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment