Window always on top?
Blitz3D Forums/Blitz3D Programming/Window always on top?| 
 | ||
| hi! this is propably one thing that can be solved with the api dll pretty quick, so whats the command for that? thanks for upcomming answers :) | 
| 
 | ||
| i just discovered this: api_SetForegroundWindow(SystemProperty("AppHWND"))the big problem about this, is that i have to call it in the >>main loop<< ... but i already call a "Delay 1000" in the main loop so the window comes only once per second to the foreground :(edit: oh, and it makes it impossible to drag other windows :( | 
| 
 | ||
| hi, this may help ;) 
Const SWP_NOSIZE=$1
Const SWP_NOMOVE=$2
Const HWND_TOPMOST=-1
Const HWND_NOTOPMOST=-2
Local HWND=SystemProperty("AppHWND")
Graphics3D 800,600,0,2
api_SetWindowPos(HWND,HWND_TOPMOST,0,0,0,0,SWP_NOSIZE+SWP_NOMOVE)
Repeat
	RenderWorld
	Flip
Until KeyHit(1)
End
 | 
| 
 | ||
| this seems like something i can work with :) thanks a lot!! and while i have your attention: do you know how to remove the window's entry out of the task bar? | 
| 
 | ||
| I use something pretty similiar: 
Const SWP_NOSIZE = 1
Const SWP_NOMOVE = 2
Const WND_FLAGS = SWP_NOMOVE Or SWP_NOSIZE
Const WND_TOP = -1
Const WND_NOTOP = -2
hWnd = SystemProperty("AppHWND")
temp = SetWindowPos(hWnd,WND_TOP,0,0,0,0,WND_FLAGS)
in my userlibs I have: SetWindowPos% ( hWnd1%, hWnd2%, ix%, iy%, icx%, icy%, wFlags%) : "SetWindowPos" in user32.decls | 
| 
 | ||
| Graphics3D 800,600,0,2
Const SWP_NOSIZE = 1
Const SWP_NOMOVE = 2
Const WND_FLAGS = SWP_NOMOVE Or SWP_NOSIZE
Const WND_TOP = -1
Const WND_NOTOP = -2
hWnd = SystemProperty("AppHWND")
temp = api_SetWindowPos(hWnd,WND_TOP,0,0,0,0,WND_FLAGS)
Repeat
	RenderWorld
	Flip
Until KeyHit(1)
Endthis seems to keep the window in the task bar anyway.. | 
| 
 | ||
|  do you know how to remove the window's entry out of the task bar?   couldn't solve this with api... but with a .dll its no problem ;) if you donīt mind to use a dll let me know if you need it cheers, chi | 
| 
 | ||
| sure why not :) that would be great! | 
| 
 | ||
| 
Global hwnd=SystemProperty("apphwnd")
Graphics3D 800,600,0,2
dll_HideHWNDfromTaskbar(hwnd)
dll_HideHWNDminmaxButton(hwnd,True)
dll_StayOnTop(hwnd,True)
Repeat
	RenderWorld
	Flip
Until KeyHit(1)
End
download: chiB3D.zip (only tested on xp... but should work on all ms-os;) | 
| 
 | ||
| hey thank you! it works very well!!! http://www.blitzbasic.com/Community/posts.php?topic=76124 i have put your name in the credits here: http://stuff.dev-ch.de/index.php?article=stuff_cpucontrol bye :) | 
| 
 | ||
| your welcome! and thanks for the credits :) thumbs up for "cpu control"... works fine here cheers, chi |