Archived

This topic is now archived and is closed to further replies.

Windows on top

This topic is 5979 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I wrote a simple tool in Visual basic that will show what a tile looks like tiled. It''s quite simple, but very effective. The problem is, I''m getting tired of it ducking behind photoshop whenever I go to edit the tile. I know there is a way to make a window stay on top, I''ve even done it before, but I can''t remember how. So how do you make visual basic form stay ontop of other applications? (not keep focus, just not hide behind other stuff) Normally I wouldn''t be asking stuff like this, but I can''t remember how to do it, and I just can''t find it in MSDN. Thanks
Drakonite [Insert Witty Signature Here]

Share this post


Link to post
Share on other sites
First call:

LONG old_style;
old_style = GetWindowLong(hWnd,GWL_EXSTYLE);
SetWindowLong(hWnd,GWL_EXSTYLE,old_style | WS_EX_TOPMOST);

or just create the window with this style.

and then:
SetWindowPos(hWnd,SWP_TOPMOST,0,0,0,0,SWP_NOSIZE | SWP_NOMOVE);


"Thats who you are. Thats what you could."
------------------------------
- Goblineye Entertainment
------------------------------


Edited by - Xeno on August 4, 2001 7:08:59 PM

Share this post


Link to post
Share on other sites
First... the tool I''m working on is in Visual Basic, not C. However I looked up that function and tried to do it.. but it still doesn''t stay on top.



Drakonite

[Insert Witty Signature Here]

Share this post


Link to post
Share on other sites
So? we're talking here on Win32 API , u can access this API from VB and VC , its not matter what u use.
u got with your VB a tool that lists all the win32 functions and how to use them (forgot its name) , look at it.


"Thats who you are. Thats what you could."
------------------------------
- Goblineye Entertainment
------------------------------


Edited by - Xeno on August 5, 2001 9:53:39 AM

Share this post


Link to post
Share on other sites