Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
_SCREEN.hWnd, FindWindow() and MAINHWND()
Message
 
À
31/07/2001 00:53:19
Gerry Schmitz
GHS Automation Inc.
Calgary, Alberta, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00537608
Message ID:
00537750
Vues:
41
>_SCREEN.hWnd is a new VFP 7.0 property that gets the "Window Handle" of the Main VFP Window and seems to work (I'm still using VFP 7.0 Beta 2).
>
>Prior to VFP 7.0, one could use the Windows FindWindow() function or the FOXTOOLS MAINHWND() function to get the VFP Main Window Handle; these also worked as expected, prior to 7.0.
>
>However, in 7.0, FindWindow() and MAINHWND() do not appear to return the Main VFP Window Handle; instead, they return one of the immediate "invisible" child windows. It seems now only _SCREEN.hWnd works properly in 7.0. Consequently, I/we are now having to do a version check when working with these functions.
>
>Normally I wouldn't care but I'm creating some "stuff" that might be used by 6.0 and 7.0 developers.
>
>Anybody else notice the same thing, or is it (maybe) only a Beta 2 problem ?
>
>Can't be a bug on my part ...
>
>:)

Gerry,

Actually, VFP has a number of Window handles associated with it. As Vlad mentioned the _VFP.hWnd refers to the frame and _SCREEN.hWnd refers to the desktop (the area the command window generally lives in). Similarly the .Top, .Left, etc. properties of these refer to these individual windows.

One thing of note, however. As with 6.0, SDI forms are different from other VFP windows. With a non-SDI form the hWnd property refers to both the frame and client area. In an SDI form, it refers to the frame. The client area is a separate window.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform