switching on task

Blitz3D Forums/Blitz3D Beginners Area/switching on task

Prama(Posted 2003) [#1]
Hello,

Im making a full screen mame frontend and i have some trouble
when i close mame the frontend is in the task bar and I have
to click on it to to return in my blitz frontend.
How can i go back directly in my application when i close an exe.

Thx for your help


soja(Posted 2003) [#2]
Try SetForegroundWindow()

Put this is one of your .decls files in the userlibs folder:
.lib "user32.dll"
SetForegroundWindow%(hwnd%):"SetForegroundWindow"

and use this in your code:
success=SetForegroundWindow(QueryObject(WndMain,1))

where WndMain is the window you want to bring to the foreground.