News:

PlayBASIC2DLL V0.99 Revision I Commercial Edition released! - Convert PlayBASIC programs to super fast Machine Code. 

Main Menu

Screen To Front

Started by kevin, November 22, 2005, 09:19:18 AM

Previous topic - Next topic

kevin

This function force the PlayBASIC screen to front.


PlayBASIC Code: [Select]
Constant HWND_TOPMOST = -1
Constant SWP_NOMOVE = 2
Constant SWP_NOSIZE = 1


LinkDll "user32"
SetWindowPos(hwnd,hWndInsertAfter,x,y,cx,cy,wFlags) alias "SetWindowPos" As integer
EndlinkDll


Function ScreenToFront()
hwnd=getscreenhandle()
SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE)
EndFunction


ScreenToFront()


Do
Cls 0
print "Force Window to Front"

Sync
loop