Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to tell if clicked outside of form
Message
De
16/05/2003 15:09:17
Mike Sue-Ping
Cambridge, Ontario, Canada
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00789340
Message ID:
00789417
Vues:
29
Yuir,

Your suggestions did exactly what I needed. You've opened my eyes to functions and commands in VFP that I never used before. I'm sure there a whole lot more waiting to be discovered too :)

Thanks for the help.

Regards,

Mike

>I believe that you can use /on key label mouse/ command here.
>Something like this:
>
>-call a form with a name, like
>do form fakeform name HELLO
>
>- to the fakeform.unload add :
>on key label mouse
>
>-in the fakeform.load event add:
>on key label mouse fakeform.whereclicked
>
>- add a method whereclicked to fakeform having code to get the object behind the mouse (sys(1270) and sys(1271) should help here) or x-y mouse coordinates (Amouseobj() should help here), and check whether it is clicked on the fakeform. If it is outside the form, call hello.release
>For example,
>lcobj=sys(1270)
>if NOT "fakeform.scx"$lower(trans(sys(1271,lcobj)))
> hello.release
>endif
>
>Hope this help
>
>
>>Hello All,
>>
>>I have a VFP7 SP1 form that contains a listbox. I allow any item in the list to be edited by displaying a second form (lets call it 'fakeform') over top of the listitem to be modified. Fakeform is exactly the same size (height and width) of the listitem to be edited. It has no border or titlebar. It is modal and thus far it works fine with the keyboard. Hitting Enter or Escape closes fakeform.
>>
>>My problem is that I would like to have fakeform disappear when the user clicks outside of its boundary. IOW, it would have the same behavior as a dropdown list where if you click anywhere outside of the dropdownlist, the dropdownlist disappears.
>>
>>
>>Your thoughts and suggestions are appreciated.
>>
>>TIA
>>
>>Mike.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform