>>>>Why does it only work with a top level form???
>>>
>>>Sorry, don't have an answer for that. Although I would guess it has to do with the way VFP paints forms in the VFP screen.
>>
>>Roi,
>>It has nothing to do with VFP. The WS_EX_LAYERED attribute needs to be set on the window for this function to work. Only top-level forms and forms with the Desktop property set to .T. are capable of having this.
>
>Thanks. I was just reading about layered windows in the docs. It says you cannot use it on child windows. Is that the reason, Non-TopLevel forms are actually child windows of the VFP main window? I'm just learning some of this stuff, so forgive me if this a lame conclusion. <s>
It really all boils down to the attributes set when the window is created. If the WS_CHILD or WS_CHILDWINDOW attribute is used, then the window is considered to be a child window. If it isn't then the window is a top-level
window (not necessarily a top-level form).
Top-level forms are top-level windows. Desktop = .T. forms are also top-level windows because the WS_CHILD attribute is not set (WS_POPUP is).
HTH.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao