Results 1 to 3 of 3

Thread: [RESOLVED][3.0/LINQ] RichTextBox Right Click?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2003
    Location
    Birmingham, AL
    Posts
    188

    Resolved [RESOLVED][3.0/LINQ] RichTextBox Right Click?

    Code:
    void richTextBox1_MouseClick(object sender, MouseEventArgs e)
            {
                MessageBox.Show(e.Button.ToString());
            }
    Can anyone tell me why this doesn't fire a message when I press the middle or right button on my mouse?
    Last edited by Tewl; Jan 7th, 2009 at 03:12 PM.

  2. #2
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985

    Re: [3.0/LINQ] RichTextBox Right Click?

    You'll need to handle MouseDown or MouseUp. MouseClick is basically a shorter way to using MouseUp and checking if the left button is clicked. I don't believe it'll pass arguments for any other buttons.
    KrisSiegel.com - My Personal Website with my blog and portfolio
    Don't Forget to Rate Posts!

    Free Icons: FamFamFam, VBCorner, VBAccelerator
    Useful Links: System.Security.SecureString Managed DPAPI Overview Part 1 Managed DPAPI Overview Part 2 MSDN, MSDN2, Comparing the Timer Classes

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jun 2003
    Location
    Birmingham, AL
    Posts
    188

    Re: [3.0/LINQ] RichTextBox Right Click?

    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width