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
lnSetting = GetWindowLong(lnHwnd, GWL_STYLE)
THIS.AddProperty("nOldGWLSTYLE", lnSetting)
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