Yes, you're in right but the form was an example. But how can i detect it if the windowclass is not a TForm is not a Delphi application window?
Main Topics
Browse All TopicsHi All!
I have a fsStayOnTop and bsNone form that's created with WS_POPUP style flag, but this window is not a popup menu like a shell context menu or a system menu. How can i detect that the window is not a 'real' menu popup window? I tried everything.
IsWindow; IsMenu; IsAnyPopup; GetWindowLong(...WS_CAPTIO
Is there any unique difference between a ws_popup form and a real menu popup window?
Thanks in advance!
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I have a StayOnTop form and i want to keep it always on top, but not over popup menus, dropdown lists and file menus. I'm hooking the WM_WINDOWPOSCHANGING and WM_WINDOWPOSCHANGED messages. If a window has WS_POPUP style then i don't send it back because default it's a menu popup. But there are some other windows created with WS_POPUP flag (e.g. a simple fsStayOnTop form without border-->bsNone) but they aren't real menu popup windows because they don't contains any menu elements...
And i'd like to find a difference between a real and a 'phantom' popup window.
i dont understand you clearly - mostly because you mix WS_POPUP with MENUes. menues themselves are something completely else, no matter if they come from the system (like maximize, minimize, restore...), from the window (file, edit, help...) or from the context (rightclick). its their nature to be more on top - even when there are stay-topmost windows. you cant influence that. same goes with comboboxes. in fact, every combobox has another window handle (which then is the listbox you get as the popular "dropdown" - thats also always topmost).
if you create a window and set its z-order with the TOPMOST flag to stay in front it should behave quite well. what else do you want? if there are other windows which are also always topmost, then both your and that window will behave like all other windows - only in their group. that means the one you click on is then really on top.
oh: and setting fsStayOnTop in delphi and using setwindowpos() are different things. experiment on that
Business Accounts
Answer for Membership
by: TNamePosted on 2006-10-12 at 04:36:11ID: 17714274
What' wrong with
"is TForm"?
if Form2 is TForm then
ShowMessage('True')
else
ShowMessage('False');
BTW,
if TControl(PopUpMenu1) is TForm then
ShowMessage('True')
else
ShowMessage('False');
will always be false