Advertisement Jump to content


This topic is now archived and is closed to further replies.


(C#) Manually invoking a DoubleClick event on a control

This topic is 5340 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

using C#, I found a InvokeClick method, which works for causing a Click event to occur on a given control, but i cant figure out how to cause a DoubleClick to occur. Ive googles and MSDNed already, but dont know what to look for. Thanks [edited by - Mulligan on June 8, 2004 7:26:22 PM]

Share this post

Link to post
Share on other sites
Controls have a DoubleClick event, which is signaled whenever the user double-clicks the control. You can emulate a double-click simply by calling the event:

if(DoubleClick != null)
DoubleClick(this, null);

Although it''s probably better to raise the event the traditional way:


Which basically wraps the above code into a virtual function.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!