When DisableWindow() is called on a maximized window that has a position greater than 0, 0, it moves the window. This doesn't work well with creating modal dialogs.
Code: Select all
Enumeration
#Window
#Button
EndEnumeration
Procedure OnButtonClick()
DisableWindow(#Window, 1)
EndProcedure
OpenWindow(#Window, 100, 100, 640, 480, "", #PB_Window_Maximize | #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget)
ButtonGadget(#Button, 10, 10, 90, 32, "Click")
BindGadgetEvent(#Button, @OnButtonClick())
Repeat
WaitWindowEvent()
Until Quit = 1


