Close button intermittently doesn't close

Just starting out? Need help? Post your questions and find answers here.
coco2
Enthusiast
Enthusiast
Posts: 368
Joined: Mon Nov 25, 2013 5:38 am
Location: Australia

Re: Close button intermittently doesn't close

Post 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.
User avatar
mk-soft
Always Here
Always Here
Posts: 5406
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Close button intermittently doesn't close

Post by mk-soft »

Without your code we cannot make a statement.
However, we suspect that you are carrying out too many updates via PostEvent.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
coco2
Enthusiast
Enthusiast
Posts: 368
Joined: Mon Nov 25, 2013 5:38 am
Location: Australia

Re: Close button intermittently doesn't close

Post by coco2 »

I think you are right, I was running the thread loop at maximum speed, so probably too many
Post Reply