Page 2 of 2

Re: Close button intermittently doesn't close

Posted: Sat Feb 24, 2024 11:13 pm
by coco2
Using PostEvent causes the main window to not show the mouse when it is moved over it and I can't click anything. It also causes some of the gadgets to not display properly.

Code: Select all

  Event = WaitWindowEvent(1)
  Select Event
    Case #Event_Update_Video
      SetGadgetState(#imgVideo, ImageID(Param\CaptureImage)) ; update the video capture output
Any ideas why that is?

I think for what I am doing, it is fine to do it in a thread. I am updating an image which according to the documentation is OK
If you need to display graphics in threads use Images and 2DDrawing instead.

Re: Close button intermittently doesn't close

Posted: Sun Feb 25, 2024 12:03 am
by mk-soft
Without your code we cannot make a statement.
However, we suspect that you are carrying out too many updates via PostEvent.

Re: Close button intermittently doesn't close

Posted: Sun Feb 25, 2024 1:02 am
by coco2
I think you are right, I was running the thread loop at maximum speed, so probably too many