besides clicking on it?:)
smurf
I cant get ur problem smurf.
When u run an app its window does become topmost.
Is it that u want the window to reamin topmost after runnign the program and not be overlapped by any othe window ever.
This message was edited by MovingFulcrum, on 6/17/2001 9:59:24 AM
i dont want my window to be topmost all the time. there is time when my program is running that when a particular event occurs i want my app to become the topmost window. so lets say im browsing the internet and when that certain event happens i want my window to appear.
thanks
smurf
SetForegroundWindow
actually i first tried using setforegroundwindow and the only thing it would do is flash the button in the taskbar. after a little searching i found out that under windows 2000, and 98 setforegroundwindow function wont actually show the window unless you first change a window setting using SystemParametersInfo.
now that i have it working i realize this isnt really what i want. i need my window to become topmost but i dont want it to be active. if it becomes active this poses a problem for the user if he is typing something.is there a solution for this?
----------------
d2k yep still working on it. this is my first real program and i want it to be great.
smurf
This message was edited by smurf, on 6/17/2001 1:03:44 PM
Smurf,
Either use SetWindowPos() so that you can turn the "topmost"
attribute on and off or set the option in the CreateWindowEx()
style when you create the window. Either works, the SetWindowPos()
is a bit more flexible to use.
Regards,
hutch@pbq.com.au
HWND_BOTTOM = 1 ; Put the window at the bottom of the Z-order.
HWND_NOTOPMOST = -2 ; Put the window below all topmost windows and above all non-topmost windows.
;Bring to normal condition
invoke SetWindowPos,hwnd,HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOSIZE
;Set window on top of all
invoke SetWindowPos,hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE
like Hutch said