Page 1 of 1

New Forms Get Duplicated #PB_Window_SystemMenu Flag

Posted: Sat Jul 05, 2025 2:15 pm
by spikey
When creating a new form the window will have '#PB_Window_SystemMenu' set as a duplicate flag in the new 'Custom Flag' property. On switching to the code view the flag is specified twice in the OpenWindow instruction.

This 'Custom flag' is also erroneously added on reopening an existing form design duplicating it there too.

Code: Select all

Procedure OpenWindow_1(x = 0, y = 0, width = 600, height = 400)
  ;                                                               ↓                        ↓                                       
  Window_1 = OpenWindow(#PB_Any, x, y, width, height, "", #PB_Window_SystemMenu | #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget)
EndProcedure

Re: New Forms Get Duplicated #PB_Window_SystemMenu Flag

Posted: Sat Jul 05, 2025 2:48 pm
by mk-soft
Confirmed ...
The problem is that when switching from code to form, the standard flags are copied to custom flags and thus added.

Re: New Forms Get Duplicated #PB_Window_SystemMenu Flag

Posted: Sun Jul 06, 2025 12:37 pm
by mk-soft
After looking at the code, the area had to be reworked.
The form CustomFlags were placed in the wrong list and it was not checked whether it was a PB constant.
As a result, the custom flags ended up on all open forms. Changes to the custom flags in code mode were also not recognised.
In this test I also noticed an error in the ProcedureBrowser, which sporadically led to a crash.

When I'm done, I'll put a current pull request in GitHub