Once I've set Cursor.Clip to a custom rectangle, how can I return it to normal. In VB I'd use
Cursor.Clip = nothing
But that don't work in C#.
How's it done?
Printable View
Once I've set Cursor.Clip to a custom rectangle, how can I return it to normal. In VB I'd use
Cursor.Clip = nothing
But that don't work in C#.
How's it done?
maybe this...
VB Code:
Cursor.Clip = null;
That's the first thing I tried but there's a compiler error about Rectangles being a value type and so can't be null. :(
I thought about storing the initial clipping region when the form loads and then using that as a fall back whenever I need to cancel my own region.
But I thought this might interfere with other programs' clip regions and I'm not keen. Maybe I'm wrong, I'm not too sure of the ground on this one.
:???:
This seem to be your best bet . I don't see any problems that might happen though .
I've coded it and it seems to work fine. I've stuck some code in the form deactivate event just to make sure it doesn't spill over to any other programs.