Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to cancel form's lostfocus event?
Message
De
29/11/1998 10:16:30
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
29/11/1998 10:01:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00162218
Message ID:
00162221
Vues:
19
>Hello
>
>I have two forms on the screen and want to cancel lostfocus event in the active form when a given condition returns false.
>I tried nodefault keyword, but it doesn't seem to work fine.
>
>This is the code in the lostfocus event:
>
>
>if ! thisform.any_method()
> wait window 'losing focus'
> nodefault
>endif
>
>When i click on the inactive form, the 'losing focus' message is displayed, the inactive form seems to be the active form because its title bar color is changed. Finnaly this form becomes the active one.
>
>thisform.show() doesn't work either
>
>What am i doing wrong?
>
>Thanks.
>
>Juan Carlos
Juan,
Add a this.controls(x).setfocus after nodefault. Controls(x) is a control on form which could be setfocused to.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform