Page 1 of 1

Disable inactive windows flag

Posted: Sun Aug 25, 2013 11:00 am
by nblackburn

Code: Select all

#PB_Window_DisableInactive
Adding this flag would disable any previously active windows (cross platform) while this window is shown, when the window is closed, the block is released.
I know this is already possible via other methods but it would make a handy flag to have :)

Re: Block inactive windows flag

Posted: Sun Aug 25, 2013 11:30 am
by PB
If by "block" you mean disabled, then for Windows (not Mac/Linux) you can do this:

Code: Select all

OpenWindow(0,200,200,200,200,"Blocked",#PB_Window_SystemMenu|#WS_DISABLED)
ButtonGadget(0,20,20,100,30,"Try to click me")
Repeat : Until WaitWindowEvent()=#PB_Event_CloseWindow
Note: You'll need to kill this app from the IDE, as the Close button will be blocked. :)

Re: Disable inactive windows flag

Posted: Sun Aug 25, 2013 11:41 am
by IdeasVacuum
What is wrong with:
DisableWindow(#Window, State)
HideWindow(#Window, State)

Re: Disable inactive windows flag

Posted: Sun Aug 25, 2013 12:13 pm
by nblackburn
Nothing, just an idea I thought that would have been handy to some.

Re: Disable inactive windows flag

Posted: Sun Aug 25, 2013 12:24 pm
by PB
> Adding this flag would disable any previously active windows (cross platform)
> while this window is shown, when the window is closed, the block is released

Sounds like you're requesting a modal window? It won't be added as a flag unless
all operating systems support it (that's the general PureBasic request rule). The
good news is that you can create your own modal window as easily as this:

http://www.purebasic.fr/english/viewtop ... 24#p342724