Page 1 of 1

Why mouse pointer occupied ?

Posted: Tue Apr 29, 2025 10:31 am
by hdt888
I have 2 windows, window A as main window, window B as 2nd window.
Why after every 4 seconds the cursor on the main window disappears (like it was occupied) ?.
Where do I fix the error?.

Code: Select all

Procedure THREAD_RELOAD_DATA_MAIN_WIN(okok)
  Repeat
    PostEvent(#EVENT_RELOAD_DATA_MAIN_WIN, #MAIN_WIN, #PB_Ignore)
    Delay(4000)
  ForEver
EndProcedure
..........
............
; Main win
Procedure Create_MAIN_WIN()
  OpenWindow(#MAIN_WIN,................)
  ......
  BindEvent(#PB_Event_CloseWindow, @Events_MAIN_WIN())
  BindEvent(#PB_Event_Gadget, @Events_MAIN_WIN(), #PB_All)
  CreateThread(@THREAD_RELOAD_DATA_MAIN_WIN(), 0)
EndProcedure
At the event loop:

Code: Select all

Procedure Events_MAIN_WIN()
  Select WaitWindowEvent()
    Case #EVENT_RELOAD_DATA_MAIN_WIN
      READ_OTHERS_REGISTRY()
      COUNT_DEVICES()
      If EventWindow() = #MAIN_WIN
        SET_TEXT_FOR_GADGETS_AT_MAIN_WIN()
        SET_TOOLTIPS_FOR_BUTTONS()
      EndIf
  EndSelect
EndProcedure

Re: Why mouse pointer occupied ?

Posted: Tue Apr 29, 2025 1:09 pm
by infratec
Your code does not show the misbehaviour.
So I can not tell you what's wrong.

Post a working code example which shows the behaviour, then we can try to find the culprit.