Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Form As Top Level with no TaskBar Button
Message
 
 
À
21/05/2009 11:35:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01401326
Message ID:
01401330
Vues:
88
Did you try to set form property
ShowInTaskbar = .F.
instead ?

>I have defined a form that is Top Level; i.e. thisform.ShowWindow = 2 - As Top-Level Form. The form is also resizeable. I have added the following into the Load() event code:
>
>
>*-* Code below will remove the taskbar button for ShowWindow=2 - As Top-Level Form
>*-*
>DECLARE INTEGER ShowWindow IN win32api INTEGER nhWnd, INTEGER nCmdShow
>DECLARE INTEGER SetWindowLong IN user32 INTEGER hWnd, INTEGER nIndex, INTEGER dwNewLong
>ShowWindow(thisform.HWnd,SW_HIDE)
>SetWindowLong(thisform.HWnd,GWL_EXSTYLE,WS_EX_TOOLWINDOW)
>ShowWindow(thisform.HWnd,SW_SHOW)
>
>
>This removes the taskbar (bar in Windows for task selection) button. This works fine except that the normal border displayed on the form is incorrect at first display. If the form is manually resized, then the form border is displayed as expected.
>
>What I am looking for is a way to have the form created initially with the border displayed correctly from the start. I have tried to programmically change the form size and force a resize in the form's Init() event -- but this does not work. I also tried to change the border type in the Init() but that didn't work either. In both cases the form's border is displayed similar to none.
>
>Thanks.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform