Jump to content
  • Advertisement

Archived

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

Mulligan

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

This topic is 5241 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
Advertisement
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:

OnDoubleClick(null);

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 GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!