Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can a mouse click be detected outside of a modal form
Message
From
27/10/2006 14:47:58
Mike Sue-Ping
Cambridge, Ontario, Canada
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01164759
Message ID:
01165144
Views:
24
>>>>I have a modal form that I show when a button is selected on another form. Is there any way to determine when a user has clicked on the underlying form (the one that contains the button that launched the modal form)?
>>>>
>>>>TIA
>>>>Mike
>>>
>>>Maybe, I am not sure because I never need that. But if you want to intercept mouse click on parent form why this form is modal?
>>
>>The form is modal because what I'm trying to do is, from a button on a form, launch the modal form that displays a calendar. This modal form has no titlebar and appears to the user as a dropdown calendar that appears immediately below (or above) the button without overlapping it (and an associated textbox that shows the date). It is 100% VFP code and I want to avoid the ActiveX calendar control.
>>
>>As such, I want my modal form calendar to behave like any dropdown where when a user clicks outside of the calendar part, it simply disappears or in my case, the form releases.
>>
>>Thanks,
>>Mike
>
>Mike,
>
>Then probably you have lostfocus or deactivate event in your control or form. If so, then probably you may check there for mdown() and if yes, then you may try to check the coordinates of the mouse cursor.

I do have code in the form.lostfocus event. I'm finding that the lostfocus event does not fire for a modal form. Am I doing something wrong?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform