Uncomment SmartWindowRefresh or SetWindowColor to see the error with PB 6.20, both version (ASM and C Backend)
Runs fine with with PB 6.04
Code: Select all
Global main_window.l
;- KO with PB 6.20 (OK with PB 6.04)
main_window = OpenWindow(#PB_Any, 0, 0, 220, 100, "Example...", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
If main_window
;- KO with PB 6.20 (OK with PB 6.04)
;SmartWindowRefresh(main_window, #True)
;- KO with PB 6.20 (OK with PB 6.04)
;SetWindowColor(main_window, 0)
ButtonGadget (1, 10, 60, 200, 30, "Close")
Repeat
Event = WaitWindowEvent()
Select Event
Case #PB_Event_Gadget
Select EventGadget()
Case 1
CloseWindow(#PB_All)
End
EndSelect
EndSelect
Until Event = #PB_Event_CloseWindow
EndIf
Code: Select all
Global main_window.l
;- OK with PB 6.20
main_window = OpenWindow(0, 0, 0, 220, 100, "Example...", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
If main_window
;- OK with PB 6.20
SmartWindowRefresh(0, #True)
;- OK with PB 6.20
SetWindowColor(0, 0)
ButtonGadget (1, 10, 60, 200, 30, "Close")
Repeat
Event = WaitWindowEvent()
Select Event
Case #PB_Event_Gadget
Select EventGadget()
Case 1
CloseWindow(#PB_All)
End
EndSelect
EndSelect
Until Event = #PB_Event_CloseWindow
EndIf
// Moved from "Bugs - Windows" to "Coding Questions" (Kiffi)


