
I hope everything is fine for you and I thank you for reading me.
Here is a first code that works correctly:
- if I click on window 0, I have events on window 0
- if I click on window 1, I have events on the window 1
Code: Select all
If OpenWindow(0, 0, 0, 300, 600, "fenetre 0", #PB_Window_SystemMenu )
OpenWindow(1, 310, 0, 300, 600, "fenetre 1", #PB_Window_SystemMenu,WindowID(0) )
Repeat
event= WaitWindowEvent()
If event<>0 And event<>13110 And event<>275 ;retire quelques évenement commun
Debug "Evenement PRINC : |"+EventWindow()+" | "+event
EndIf
Until event= #PB_Event_CloseWindow
EndIf
Problems happen when you install a timer:
Code: Select all
If OpenWindow(0, 0, 0, 300, 600, "fenetre 0", #PB_Window_SystemMenu )
OpenWindow(1, 310, 0, 300, 600, "fenetre 1", #PB_Window_SystemMenu,WindowID(0) )
AddWindowTimer(0,1,100)
Repeat
event= WaitWindowEvent()
If event<>0 And event<>13110 And event<>275 ;retire quelques évenement commun
Debug "Evenement PRINC : |"+EventWindow()+" | "+event
EndIf
Until event= #PB_Event_CloseWindow
EndIf
What do you think?