Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing the messagebox title
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00550255
Message ID:
00551005
Vues:
32
>First, you need two API function declarations
DECLARE INTEGER FindWindow IN Win32API;
>  STRING @lpClass, STRING @lpTitle
>DECLARE INTEGER SetWindowText IN Win32API;
>  INTEGER hWnd, STRING @lpString
Next you'll need a timer, with something like the following in the Timer event
LOCAL lctitle, lnhwnd
>* Naturally, you'll need a form property named as below and inititalized
>* to the value of the timeout
>lctitle = "Time remaining " + TRANSFORM(ThisForm.nSecondsLeft)
>lnhwnd = FindWindow(0, @lctitle)
>IF lnhwnd > 0
>  ThisForm.nSecondsLeft = ThisForm.nSecondsLeft - 1
>  lctitle = "Time remaining " + TRANSFORM(ThisForm.nSecondsLeft)
>  = SetWindowText(lnhwnd, @lctitle)
>ENDIF
George,
FYI, for whatever reason, this doesn't work in VFP 7 when you add the new timeout parameter. In VFP 6 and in VFP 7 without the timeout parameter, displaying a messagebox allows timer events to fire. It seems that the timer events are blocked when the messagebox is going to time out.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform