#PB_Window_ScreenCentered | #PB_Window_Minimize
Posted: Tue Sep 24, 2013 7:09 pm
Hello, long time i haven't found anything misunderstood, until now. In PB 4.xx i have used:where the window is opened minimized, when restored it is positioned in the center of the screen, but in PB 5.20 the window is minimized, but when restored its position is top left of the screen, so the flag #PB_Window_ScreenCentered is ignored. For the solution i have to set minimized state after positioning the window centered?
Code: Select all
#PB_Window_ScreenCentered | #PB_Window_MinimizeCode: Select all
If OpenWindow(0, 0, 0, 222, 200, "ButtonGadgets", #PB_Window_MinimizeGadget | #PB_Window_ScreenCentered | #PB_Window_Minimize)
;SetWindowState(0, #PB_Window_Minimize)
ButtonGadget(0, 10, 10, 200, 20, "Standard Button")
ButtonGadget(1, 10, 40, 200, 20, "Left Button", #PB_Button_Left)
ButtonGadget(2, 10, 70, 200, 20, "Right Button", #PB_Button_Right)
ButtonGadget(3, 10,100, 200, 60, "Multiline Button (longer text gets automatically wrapped)", #PB_Button_MultiLine)
ButtonGadget(4, 10,170, 200, 20, "Toggle Button", #PB_Button_Toggle)
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf