Windows on top

Started by
2 comments, last by Drakonite 22 years, 8 months ago
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]
Shoot Pixels Not People
Advertisement
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

------------------------------- Goblineye Entertainment------------------------------

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]
Shoot Pixels Not People
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

------------------------------- Goblineye Entertainment------------------------------

This topic is closed to new replies.

Advertisement