Keeping focus of a window
BlitzPlus Forums/BlitzPlus Programming/Keeping focus of a window
| ||
Hiya, Can a blitz program still do it's stuff, even if it's running behind another app... I dont want to hide it next to the clock or anything, as long as it's on the taskbar... I'm happy!!! But, I've noticed that it sorta stops when you put another window in front of it, then only resumes when you give focus back to the window!!! Is there anyway of keeping it going??? Dabz :) |
| ||
Have a look at AutoSuspend http://www.blitzbasic.com/bpdocs/command.php?name=AutoSuspend&ref=2d_cat |
| ||
try adding the following line of code to the top of your source: AutoSuspend False Mr Brine |
| ||
That's the first thing I've tried!!! But it still hangs when a new window has focus!!! :( Dabz :) |
| ||
Can anyone help me with this??? Now, I know when a user brings another window to the foreground, because the event return's $2002 But, if I do this:- win = CreateWindow("Blah",0,0,300,300,Desktop(),5) ;hwnd = QueryObject(win,1) Repeat WaitEvent() id=EventID() Select(id) Case $803 Exit Case $2002 Notify "Na" End Select Forever The blitz window goes behind the new window, and the notify command only gets called when I bring the blitz window back to the top!!! But I want it to get called straight away, as soon as they switch windows!!! Anyone get me??? Dabz :( P.S. I've tried use AUTOSUSPEND, but to me, that command does nothing??? |
| ||
try replacing the $2002 with $2001 |
| ||
lol, cheers Mr Brine!!! Jeez, I've spent hours mucking on with that!!! :( Anyway, thanks very much for your help.. much appreciated!!! :D Dabz :) |