Disable inactive windows flag

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
nblackburn
User
User
Posts: 67
Joined: Mon Aug 19, 2013 1:22 am
Location: United Kingdom
Contact:

Disable inactive windows flag

Post 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 :)
Last edited by nblackburn on Sun Aug 25, 2013 11:32 am, edited 3 times in total.
Image
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Block inactive windows flag

Post 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. :)
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Disable inactive windows flag

Post by IdeasVacuum »

What is wrong with:
DisableWindow(#Window, State)
HideWindow(#Window, State)
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
nblackburn
User
User
Posts: 67
Joined: Mon Aug 19, 2013 1:22 am
Location: United Kingdom
Contact:

Re: Disable inactive windows flag

Post by nblackburn »

Nothing, just an idea I thought that would have been handy to some.
Image
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Disable inactive windows flag

Post 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
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
Post Reply