#PB_Window_Modal
#PB_Window_Modal
Pretty please?
[edit]
Oh yeah - and cross-platform.
[edit]
Oh yeah - and cross-platform.
Yeah I saw that thread. Can it be done in one line?
I don't want to start this debate again.... it has been done extensively already. Here is the psuedo-code I am looking for:
I don't know, but it seems easier to me.
Could just be me though.
Could just be all those braincells I lost in my youth.
Maybe I am just crazy....
I don't want to start this debate again.... it has been done extensively already. Here is the psuedo-code I am looking for:
Code: Select all
OpenWindow(#Window_0,10,10,100,200,#PB_Window_Modal)
Could just be me though.
Could just be all those braincells I lost in my youth.
Maybe I am just crazy....
ShowWindow...

For example, maybe create a routine you could call
"ShowWindowModal(your_window_#)"
and that routine would make your window active with modal behavior.
Or even;
"ShowWindow(your_window_#, boolean)"
with the boolean parameter used to determine the window modality (whether to use DisableWindow or not). I believe Delphi and other languages work like that, determining their modality when the window is shown, not when it is created.
If I have some time I'll try and throw something together to demonstrate what I mean.
HTH
Re: #PB_Window_Modal
And also #PB_Window_ToolWindow would be nice, to avoid having to do it
later like this:
later like this:
Code: Select all
SetWindowLong_(hWnd,#GWL_EXSTYLE,GetWindowLong_(hWnd,#GWL_EXSTYLE) | #WS_EX_TOOLWINDOW)
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
Re: #PB_Window_Modal
I haven't worked with it yet but would the new StickyWindow work here for you PB?PB wrote:And also #PB_Window_ToolWindow would be nice
Re: #PB_Window_Modal
> would the new StickyWindow work here
StickWindow <> ToolWindow.
StickWindow = Always on top -> SetWindowPos_(hWnd,#HWND_TOPMOST,0,0,0,0,#SWP_NOMOVE|#SWP_NOSIZE)
ToolWindow = Not in the Taskbar -> SetWindowLong_(hWnd,#GWL_EXSTYLE,GetWindowLong_(hWnd,#GWL_EXSTYLE)|#WS_EX_TOOLWINDOW)
StickWindow <> ToolWindow.

StickWindow = Always on top -> SetWindowPos_(hWnd,#HWND_TOPMOST,0,0,0,0,#SWP_NOMOVE|#SWP_NOSIZE)
ToolWindow = Not in the Taskbar -> SetWindowLong_(hWnd,#GWL_EXSTYLE,GetWindowLong_(hWnd,#GWL_EXSTYLE)|#WS_EX_TOOLWINDOW)
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
Re: #PB_Window_Modal
I came across this topic while browsing today.
From my point of view, this feature would be helpful. That's why I'm pulling it out of the depths of the forum.
Maybe this comment gives hope:
From my point of view, this feature would be helpful. That's why I'm pulling it out of the depths of the forum.

Maybe this comment gives hope:
BTW: I know about the "workarounds" -- and I am just working on my own.freak wrote: Wed Feb 22, 2006 1:35 pm Its a common feature in other languages. So maybe for a future version, why not.
Just because it worked doesn't mean it works.
PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).
PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).