Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help with Window Object
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00389064
Message ID:
00389257
Vues:
16
>OIC. I found that the window doesn't like to have it's name reassigned. Try this, it works like a charm ;->
>
>-Matt
>
>*-------------
>*MMM.prg
>*-------------
>SET PROC TO MMM.PRG
>DEFINE WINDOW lwWin1 FROM 1,1 TO 5,15 SYSTEM GROW FLOAT CLOSE NAME oWin1
>DEFINE WINDOW lwWin2 FROM 3,3 TO 7,18 SYSTEM GROW FLOAT CLOSE NAME oWin2
>
>oWin1.AddObject("WinTimer","WinTimer")
>oWin1.AddProperty("Reference", "oWin1")
>MODI COMM foo1.prg WINDOW lwWin1 NOWAIT
>=Inkey(2)
>
>oWin2.AddObject("WinTimer","WinTimer")
>oWin2.AddProperty("Reference", "oWin2")
>MODI COMM foo2.prg WINDOW lwWin2 NOWAIT
>
>*------------------------------------------------
>DEFINE CLASS WinTimer AS TIMER
>Interval = 5000
>
>PROCEDURE Timer
>wait window timeout .3 "Timer Event of: " + ALLTRIM(This.Parent.Reference)
>IF ! This.Parent.Visible
> *--Perform whatever unload/cleanup code here.
> This.Parent.Release()
>ENDIF
>ENDPROC

Maybe what would work better is to have a timer object that has an array property of the forms to be editted. This way each time you edit something, you add the form name to the array, and each time the timer fires, you see if that form is still visible. Maybe that will work?
Fred
Microsoft Visual FoxPro MVP

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

Click here to load this message in the networking platform