|
-
June 30th, 2008, 11:01 PM
#1
ContextMenuStrip in RichTextBox
How can I show ContextMenuStrip in RichTextBox when I highlight a word and right click the mouse?
The code below only show the ContextMenuStrip when I double click in the RichTextBox
Code:
Private Sub rtb_MouseDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles rtb.MouseDoubleClick
ContextMenuStrip1.Show(MousePosition, Right)
End Sub
Thanks
-
July 1st, 2008, 08:36 AM
#2
Re: ContextMenuStrip in RichTextBox
u can mouse up event for this purpse
Code:
If e.Button = Windows.Forms.MouseButtons.Right Then
ContextMenuStrip1.Show(MousePosition, Right)
-
July 2nd, 2008, 04:51 AM
#3
Re: ContextMenuStrip in RichTextBox
-
July 2nd, 2008, 08:18 AM
#4
Re: ContextMenuStrip in RichTextBox
Good if ur problem solved
last time i did mistakes
u can do it as also
Code:
Private Sub RichTextBox1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles RichTextBox1.MouseUp
If e.Button = Windows.Forms.MouseButtons.Right Then
ContextMenuStrip1.Show(RichTextBox1, New Point(e.X, e.Y))
End If
End Sub
-
October 23rd, 2015, 09:25 AM
#5
Re: ContextMenuStrip in RichTextBox
 Originally Posted by imname
How can I show ContextMenuStrip in RichTextBox when I highlight a word and right click the mouse?
The code below only show the ContextMenuStrip when I double click in the RichTextBox
Code:
Private Sub rtb_MouseDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles rtb.MouseDoubleClick
ContextMenuStrip1.Show(MousePosition, Right)
End Sub
Thanks
Can you help me use this code for a spellchecker suggester?
-
October 23rd, 2015, 09:27 AM
#6
Re: ContextMenuStrip in RichTextBox
How can I use this code for a spell checker suggester?
-
October 23rd, 2015, 09:28 AM
#7
Re: ContextMenuStrip in RichTextBox
Can you help me use this code for a spellchecker suggester?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|