Modeless Form Keep Focus

Modeless Form Keep Focus

HJohn1
Advocate Advocate
1,027 Views
3 Replies
Message 1 of 4

Modeless Form Keep Focus

HJohn1
Advocate
Advocate

Could someone show me how I could force a modeless form to keep focus.  There is a sample on the ObjectARX docs but I can find anything for Dot Net. Thanks

0 Likes
1,028 Views
3 Replies
Replies (3)
Message 2 of 4

jshipley
Advocate
Advocate

I was looking for the same thing...  Any help?

 

Thanks

0 Likes
Message 3 of 4

fieldguy
Advisor
Advisor

I think that would be a modal dialog (http://en.wikipedia.org/wiki/Dialog_box).

 

There was an old discussion about how to determine when the mouse position was over the dialog box (can't find it now), but it doesn't make sense to me to force the mouse to stay within the form boundaries.  If the purpose of the dialog is to force the user to provide input before continuing, I would use a modal dialog.  You can have a modeless dialog call a modal dialog.  That is how msgbox works.  

0 Likes
Message 4 of 4

Anonymous
Not applicable
Trap the form.enter event and set the form.KeepFocus property to true. Trap the form.leave event and set the form.keepFocus property to false.

HomeBoy out
0 Likes