Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setting NoTitle in a top level form
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00683976
Message ID:
00687345
Vues:
47
Hi Paul,

>>>>>I´ve got a class based on a form that has it´s TitleBar set to 0 (shut off) and it's a top-level, modal, form. When I create an instance of it, it still shows a title bar. The weird thing is, if I create an actual VFP form (not a class) with the same property settings, it works just fine. Anyone run into this before? Or, does anyone have any work arounds (I suppose I could just use a normal form instead of a class...)?

>Yep. That's how it's set. Like I said, this works just fine if I use a form as opposed to a class. I'm wondering why there is even a difference. Very strange.

Put the following code in the Load() event method of the form class:
#DEFINE GWL_STYLE (-16)
#DEFINE WS_CAPTION 0x00C00000

DECLARE INTEGER SetWindowLong IN user32; 
        INTEGER hWnd, INTEGER nIndex, INTEGER dwNewLong 

DECLARE INTEGER GetWindowLong IN user32; 
        INTEGER hWnd, INTEGER nIndex 

LOCAL lnHwnd, lnSetting
lnHwnd = THIS.Hwnd

*-- Get old style setting
lnSetting = GetWindowLong(lnHwnd, GWL_STYLE)
THIS.AddProperty("nOldGWLSTYLE", lnSetting)

*-- Calculate and set new style setting
lnSetting = lnSetting - WS_CAPTION
SetWindowLong(lnHwnd, GWL_STYLE, lnSetting) 
I've added this to the API section a minute ago, but I think it will take some time until the new entries will be visible.

Regards + HTH,
Armin

Armin Neudert
Regional Director (Stuttgart) of German FoxPro User Group dFPUG

MCP for Visual FoxPro

Expert/Editor of the VFP section in the German Codezone community portal
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform