Custom Application Error when installed on client Workstation

  • (2 Pages)
  • +
  • 1
  • 2

16 Replies - 942 Views - Last Post: 13 December 2019 - 02:21 PM Rate Topic: -----

#16 Narflak   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 35
  • Joined: 19-November 18

Re: Custom Application Error when installed on client Workstation

Posted 13 December 2019 - 08:50 AM

To use the primary UI Thread is the following safe/good practice:

this.Invoke((MethodInvoker)delegate
               {
                   DisplayLoginSplash();

               });


Was This Post Helpful? 0
  • +
  • -

#17 Skydiver   User is offline

  • Code herder
  • member icon

Reputation: 7239
  • View blog
  • Posts: 24,542
  • Joined: 05-May 12

Re: Custom Application Error when installed on client Workstation

Posted 13 December 2019 - 02:21 PM

Yes, but why? Aren't you already running on the primary UI thread already? Why would you try to use Invoke() to get back to the main thread when you are already running on it?

I suspect that the reason why your animation is not working is because there is something else that is running on the main thread that is hogging the CPU and not letting timer and paint messages to come through.

I highly suggest starting over. If you can take advantage of the new C++ await and async keywords, do so. These are mean to make it easier to deal with keeping the UI thread responsive without having to bend over backwards trying to play with threads and synchronization.
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2