GUI Focus

BlitzPlus Forums/BlitzPlus Programming/GUI Focus

Moore(Posted 2006) [#1]
How do I keep focus on my application. So that when they try to switch to another window of my app or another app focus is returned to the current window?


keyboard(Posted 2006) [#2]
why do you want to stop them? We all want to Alt/Tab, you know :)

Seriously, people often do need to switch focus, it seems to me the emphasis should be on preserving the proper "game state" for them to return to, like not having any characters walk off a cliff while the user is checking their email :)

jm2cw !


Adam Novagen(Posted 2006) [#3]
Hear hear! All hail keyboard's logic!


Moore(Posted 2006) [#4]
Ok heres the problem..... the blitz Plus GUI is procedureal so unless I want to deal will all possible events for all the gadgets of all the windows of my application in the main program loop i have to seperate it out with a waitevent program loop for wach window so if you call a dialog box from the main app window, choose to ignore it, switch back to the main app and try to use it nothing will happen cause your still in the dialog box's program loop and non of the events for the main app window are being handled..... any solutions?


Alaric(Posted 2006) [#5]
Hmm... are you generating the dialog box window yourself in the program? If so, why not just have the dialog box's loop check for the $803 (window close) event? Head to Command Ref. --> GUI Events at the B+ startup screen to see a list of all events. If you are using Proceed/Notify/Confirm commands, then why even make a loop for them? They pause the program for you every time they pop up. If you're not doing one of these, then what are you doing? It's just a little bit harder to help if we don't know what you're talking about.