Change System Cursor

keb1965

Well-known member
Joined
Feb 9, 2009
Messages
103
Programming Experience
10+
Background:
I have been searching for a way to create a borderless full screen form with several controls and have the form translucent but have the controls opaque. Sice I haven't been able to effectively do this (writing it from scratch would be more work than I want to devote to it) I decided to fake it.
Since it is all about appearance anyway, I figured I could display 2 forms, so what I did is displayed a full screen borderless form with an opaque property of 65%, then I displayed a modal dialog (again borderless) in the center of the 65% form, then set it to TopMost. Cool .. everything looks great, and the controls are what I want ... except the cursor.

When the mouse moves outside of the modal dialog, I want the cursor to change to OCR_NO (cursors.no) except it always changes to the default arrow. I tried changing the 65% form to cursors.no but it still doesn't work, because it is not available (i.e. the dialog is modal).

I even tried using the SetSystemCursor API and it still will not update it.

Maybe I am missing something really silly .. or maybe I need to step back for a while. Regardless, I'd be supremely appreciative if I could get some direction on this problem.

TIA
 
Don't use a modal dialogue. Use a modeless dialogue, i.e. an owned form. By definition, it will always appear in front of it's owner but it will not prevent access to that owner.
 
Well, that seems to work, the only problem at this point is if the user clicks outside the second form, the translucent form takes precendence and I have to handle the events in the translucent form to make sure it is behind the actual form we want to work with.

Of course that is a simple proposition, but it causes a brief flicker when the mouse moves outside the form ... maybe I need to intercept the mouseclick event ...

I'll take your advice and try to intercept the messages and make it work as expected.

Thanks
 
Back
Top