Newsgroups : Borland : borland.public.delphi.rtl.win32 : 2008 May : Making a window off-screen

www.cryer.info
Managed Newsgroup Archive

Making a window off-screen

Subject:Making a window off-screen
Posted by:"JJ" (nospam@nospam.com)
Date:Fri, 30 May 2008 20:21:11

I have an application (EXE) that I need to have a main window that is non
visible, but dialogs from the app need to popup periodically.
(another application is controlling it, sendmessage to it to popup some
dialogs)

I've got it working great by just setting the .LEFT parameter of the main
window to a negative number (-5000) and same for the other params like
right ) , but on some PC's, this doesn't work, and my app makes an unwanted
appearance on the main screen at the coordinates of
PlaceMent.RCNormalPosition.Left  top, right and bottom.

I've tried SetWindowPlacement that sets these things like
RCNormalPosition.Left to negative numbers, but Windows is determined to
ignore that, and show my app on screen.
SetWindowPlacement seems to only work when the numbers are on-screen,
otherwise its ignored, and puts my window on-screen.

Is there a good way to hide my main window, and still have dialogs able to
popup?

Replies:

www.cryer.info
Managed Newsgroup Archive