I have a control that has a Cursor property of type System.Windows.Forms.Cursor. Here's an example of what I'm trying to do:
if (someCondition)
{
oldCursor = myControl.Cursor;
myControl.Cursor = Cursors.Hand;
}
else
{
myControl.Cursor = oldCursor;
}
I've stepped into the code using breakpoints and I can see that the logic is correct. However, when the control's Cursor property gets set back to oldCursor, the visual appearance of the cursor remains the same (e.g. Cursors.Hand).
I've noticed the CopyHandle() method within the Cursor class and am wondering if I need to use this in my copy operation somehow.
Can anybody give some insight into how to copy a Cursor reference?