Keeping Focus of a Window

Blitz3D Forums/Blitz3D Programming/Keeping Focus of a Window

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

if the blitzapp runs in windowed mode, then yes. If it was fullscreen then no since this will pause the blitzapp.

You can write a function in a decls file, I guess you need to use the PositionWindow Function, a function of the user32.dll AFAIK. I remember It tried this a long time ago, and Things like WindowSetfocus, BringWindowToTop, ShowWindow simply refused to work, so I used PositionWindow with the topmost parameter, this worked.

So you would need to run the other exe,then wait some seconds, then force the blitzapp to gain focus again.

EDIT - ouch - forget POsitionWindow, in fact the Syntax is:
SetWindowPos...
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/WinUI/WindowsUserInterface/Windowing/Windows/WindowReference/WindowFunctions/SetWindowPos.asp