Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Binding to _Screen.ActiveForm
Message
De
24/03/2006 17:44:32
 
 
À
24/03/2006 16:58:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01107535
Message ID:
01107539
Vues:
17
It works if you bind to "_SCREEN", not "_VFP".

[Update]

But not everytime. :(


>Hi, guys, got an interesting one here. I'm trying to adjust something everytime a different form is activated without having to put code in the form class. (Trying to do an observer kind of thing.) I figured I'd bind to changes to _SCREEN.ActiveForm, but it doesn't seem to work. Here's my test code:
>
>[code]
>
>ON KEY LABEL f12 clear events
>
>o=CREATEOBJECT("TestBind")
>BINDEVENT(_vfp,"ActiveForm",o,"HandleEvent")
>
>o1=CREATEOBJECT("form")
>o1.Name = "FirstForm"
>o1.Caption = "First"
>o1.Show()
>
>o2=CREATEOBJECT("Form")
>o2.Name = "SecondForm"
>o2.Caption = "Second"
>o2.show()
>
>READ EVENTS
>
>RETURN
>
>DEFINE CLASS TestBind AS Custom
>
>PROCEDURE HandleEvent
>
>DEBUGOUT PROGRAM()
>
>ENDPROC
>
>ENDDEFINE
>[/code]
>
>Any suggestions? For that matter, I'll really want to do this when using a top-level form as my background, so ideas about what I can bind to there would be helpful.
>
>Tamar
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform