Hi,
I encountered a problem and I don't know if it's a bug or
if I'm doing something wrong. I wrote a UserControl in
which I wireup 2 event handlers MouseDown and MouseUp.
MouseDown changes the cursor to a hand and MouseUp
restores the default cursor, here's the code:
private void ReproduceProblem_MouseDown(object sender,
System.Windows.Forms.MouseEventArgs e)
{
this.Cursor = Cursors.Hand;
}
private void ReproduceProblem_MouseUp(object sender,
System.Windows.Forms.MouseEventArgs e)
{
this.Cursor = Cursors.Default;
}
These are the only lines that I have added in the
UserControl project. Here is my problem when I add the control to
a form and run it, the cursor responds correctly(it chages to a hand
and back to the arrow) but when I close the form the
application hangs 1 out of 2 times.
If anyone knows what I'm doing wrong please help!
Thanks in advance
dominic
I encountered a problem and I don't know if it's a bug or
if I'm doing something wrong. I wrote a UserControl in
which I wireup 2 event handlers MouseDown and MouseUp.
MouseDown changes the cursor to a hand and MouseUp
restores the default cursor, here's the code:
private void ReproduceProblem_MouseDown(object sender,
System.Windows.Forms.MouseEventArgs e)
{
this.Cursor = Cursors.Hand;
}
private void ReproduceProblem_MouseUp(object sender,
System.Windows.Forms.MouseEventArgs e)
{
this.Cursor = Cursors.Default;
}
These are the only lines that I have added in the
UserControl project. Here is my problem when I add the control to
a form and run it, the cursor responds correctly(it chages to a hand
and back to the arrow) but when I close the form the
application hangs 1 out of 2 times.
If anyone knows what I'm doing wrong please help!
Thanks in advance
dominic