Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. How to Create MouseDoubleClick Event in C#

How to Create MouseDoubleClick Event in C#

Scheduled Pinned Locked Moved C#
csharptutorialquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    raj231362
    wrote on last edited by
    #1

    Hello everyone, i have button in application when user double click the button the string value show in richtextbox.but how??? here is my code:- private void MainXmlStart_MouseDoubleClick(object sender, MouseEventArgs e) { richTxt.Text = "\nn"; richTxt.Focus(); } Please give me idea...??? where is a mistake...!! Thanks, Amit

    D 1 Reply Last reply
    0
    • R raj231362

      Hello everyone, i have button in application when user double click the button the string value show in richtextbox.but how??? here is my code:- private void MainXmlStart_MouseDoubleClick(object sender, MouseEventArgs e) { richTxt.Text = "\nn"; richTxt.Focus(); } Please give me idea...??? where is a mistake...!! Thanks, Amit

      D Offline
      D Offline
      dan sh
      wrote on last edited by
      #2

      Doubleclick event does not fire for button. It is because ControlStyles.StandardDoubleClick property is set to false. In order to fire the double click event, you will need to create your own button by inheriting the button and setting ControlStyles.StandardClick and ControlStyles.StandardDoubleClick to true. This can be done using SetStyle method.

      The word "politics" describes the process so well: "Poli" in Latin meaning "many" and "tics" meaning "bloodsucking creatures." जय हिंद

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups