• Advertisement

Archived

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

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

This topic is 5066 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