Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MouseDown action fires MouseUp as well #1

Closed
Zyxil opened this issue Aug 11, 2011 · 1 comment
Closed

MouseDown action fires MouseUp as well #1

Zyxil opened this issue Aug 11, 2011 · 1 comment

Comments

@Zyxil
Copy link

Zyxil commented Aug 11, 2011

Added this to test how focusing works:

'''
//in ExampleForm()
graphControl.MouseUp += new MouseEventHandler(graphControl_MouseUp);

//elsewhere
void graphControl_MouseUp(object sender, MouseEventArgs e)
{
SystemSounds.Beep.Play();
if (graphControl.FocusElement != null)
lblFocus.Text = graphControl.FocusElement.ToString();
else
lblFocus.Text = string.Empty;

    }

'''

When you click and hold, you will hear a beep, and another when you let go.

@LogicalError
Copy link
Owner

Thanks & it's fixed now :)
It had to do with the event delegates being called before the actual work had been done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants