WindowY why only with his work, Delay()?
Posted: Wed Oct 15, 2014 2:22 pm
Code: Select all
ProcedureDLL WindowBorder(Window)
;Delay(30) ;
Protected BorderX = WindowX(Window,#PB_Window_InnerCoordinate) - WindowX(Window,#PB_Window_FrameCoordinate)
Protected InnerY = WindowY(Window,#PB_Window_InnerCoordinate)
Protected FrameY = WindowY(Window,#PB_Window_FrameCoordinate)
Protected BorderY = InnerY - FrameY
SetGadgetText(1, "#PB_Window_InnerCoordinate "+InnerY + #CRLF$ + "#PB_Window_FrameCoordinate "+FrameY + #CRLF$ + "BorderY "+BorderY)
EndProcedure
CompilerIf (#PB_Compiler_IsMainFile)
Procedure Window(Flag)
OpenWindow(1,0,0,400,200,"",#PB_Window_ScreenCentered|Flag) :StickyWindow(1,#True)
ButtonGadget(5,5,150,190,24,"#PB_Window_MaximizeGadget") :SetGadgetData(5,#PB_Window_MaximizeGadget)
ButtonGadget(15,200,150,190,24,"#PB_Window_MinimizeGadget") :SetGadgetData(15,#PB_Window_MinimizeGadget)
TextGadget(1,5,5,WindowWidth(1)-10,84,"")
WindowBorder(1)
EndProcedure
Window(#PB_Window_SystemMenu)
Repeat
Event = WaitWindowEvent()
If Event = #PB_Event_Gadget
If EventGadget() = 5
Window(GetGadgetData(5))
ElseIf EventGadget() = 15
Window(GetGadgetData(15))
EndIf
EndIf
Until Event = #PB_Event_CloseWindow
CompilerEndIf