Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to detect if window is minimized
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00181127
Message ID:
00182320
Vues:
13
>>I placed a code in the deactivate method of a form
>>
>>if thisform.windowstate=1
>> =minimize to tray
>>endif
>>
>>this works when you run the form but when i compile it to an exe it doesn't. Any workaround?
>>
>>Thanks
>
>Try _screen.windowstate instead of thisform.windowstate - might work.


Failing that, the following API code might work:

DECLARE INTEGER GetActiveWindow IN WIN32API
DECLARE INTEGER IsIconic IN WIN32API INTEGER hWnd

lIsMinimized = IsIconic(GetActiveWindow()) # 0
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform