Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Click and drag a form
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01587763
Message ID:
01587837
Vues:
101
This message has been marked as the solution to the initial question of the thread.
Hi Daniel,

I've got confused with the VFP version you marked your initial message with.

True, VFP6 does not have hWnd property. Still it's not the end of the road ))

When a VFP form is active -- i.e. it possesses the keyboard focus -- at least two API functions can return the window handle for the form. While VFP9 does this intrinsically.

API declarations:
DECLARE INTEGER GetFocus IN user32
DECLARE INTEGER GetActiveWindow IN user32
Usage (once declared):
hWnd = GetFocus()
hWnd = GetActiveWindow()
The value obtained through either call is exactly the one that would have been stored in ThisForm.hWnd. Again, and this is important, the form must have the keyboard focus when the API is called.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform