PC Review


Reply
 
 
Cc
Guest
Posts: n/a
 
      26th Oct 2004
how do I show context menu on richtextbox?

I try select the contextmenu under properties , but still no use do I miss
something. (VS 2005)



 
Reply With Quote
 
 
 
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      26th Oct 2004
"Cc" <(E-Mail Removed)> schrieb:
> how do I show context menu on richtextbox?


<URL:http://dotnet.mvps.org/dotnet/samples/controls/downloads/RichTextBoxContext.zip>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

 
Reply With Quote
 
Sakharam Phapale
Guest
Posts: n/a
 
      27th Oct 2004
Hi

First add the ContextMenu on the form and set RichTextBox.ContextMenu
property.
Then write following code.

Private Sub myRichTextBox_MouseDown(ByVal sender As Object, ByVal e As
System.Windows.Forms.MouseEventArgs) Handles myRichTextBox.MouseDown
If e.Button = MouseButtons.Right Then
myContextMenu.Show(myRichTextBox, New Point(e.X, e.Y))
End If
End Sub

Hopes this will help.

Sakharam Phapale

"Cc" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> how do I show context menu on richtextbox?
>
> I try select the contextmenu under properties , but still no use do I miss
> something. (VS 2005)
>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting rid of the ContextMenu Dom Microsoft C# .NET 0 1st Jan 2008 10:06 PM
ContextMenu wandii Microsoft VB .NET 7 5th Sep 2006 09:36 PM
ContextMenu - MVP please help Herfried K. Wagner [MVP] Microsoft Dot NET Framework Forms 1 15th Jul 2004 05:57 PM
Is it possible to add ContextMenu items to the Standard TextBox ContextMenu??? =?Utf-8?B?TWlrZSBpbiBQYXJhZGlzZQ==?= Microsoft Dot NET Framework Forms 1 15th Mar 2004 07:54 AM
ContextMenu Dino M. Buljubasic Microsoft VB .NET 4 29th Sep 2003 10:24 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:30 PM.