Auto refresh splash screen

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #16
    Post a link to the thread where you previously got help on this for further reference. You should probably have just used that same thread.

    Comment

    • alag20
      New Member
      • Apr 2007
      • 84

      #17
      Originally posted by r035198x
      Post a link to the thread where you previously got help on this for further reference. You should probably have just used that same thread.

      Comment

      • alag20
        New Member
        • Apr 2007
        • 84

        #18
        Originally posted by Plater
        So you have created a TimerCallback and everything?
        Really I don't know why all this work is needed, I've never needed anything so extravagant for it.

        [code=c#]
        // Create the delegate that invokes methods for the timer.
        TimerCallback mytimerDelegate = new TimerCallback(U pdateStatus);

        // Create a timer that signals the delegate to invoke
        // UpdateStatus after 1/2 second, and every 1/4 second thereafter.
        Timer stateTimer = new Timer(timerDele gate, mytimerDelegate , 500, 250);

        public void UpdateStatus(Ob ject stateInfo)
        {
        //do stuff in your timer-triggered thread
        }
        [/code]
        Here is my code in the new thread [bytes wasnt letting me post on this thread previously when I made the new thread] http://bytes.com/forum/showthread.ph...41#post3182241

        Comment

        • Plater
          Recognized Expert Expert
          • Apr 2007
          • 7872

          #19
          Originally posted by alag20
          Here is my code in the new thread [bytes wasnt letting me post on this thread previously when I made the new thread] http://bytes.com/forum/showthread.ph...41#post3182241
          *Taken care of*

          MODERATOR

          Comment

          • alag20
            New Member
            • Apr 2007
            • 84

            #20
            Originally posted by Plater
            *Taken care of*

            MODERATOR

            Thanks again Plater for merging the threads. Can you please advise how to resolve this?

            Comment

            • Plater
              Recognized Expert Expert
              • Apr 2007
              • 7872

              #21
              The cross threading exception usually only popups when debuging (it gets ignored in a regular build)
              You would want to use the InvokeRequired property on your gui items to find out if you need to invoke (force the command to execute on the same thread) for the gui.

              Comment

              • alag20
                New Member
                • Apr 2007
                • 84

                #22
                Originally posted by Plater
                The cross threading exception usually only popups when debuging (it gets ignored in a regular build)
                You would want to use the InvokeRequired property on your gui items to find out if you need to invoke (force the command to execute on the same thread) for the gui.
                Sorry but I am a bit lost there... Can you please explain [the Invoke bit]?

                Comment

                • Plater
                  Recognized Expert Expert
                  • Apr 2007
                  • 7872

                  #23
                  Originally posted by alag20
                  Sorry but I am a bit lost there... Can you please explain [the Invoke bit]?
                  Just follow the messages it gives you when you get the exception. MSDN has a few examples that work well to solve that problem.

                  Comment

                  • alag20
                    New Member
                    • Apr 2007
                    • 84

                    #24
                    Originally posted by Plater
                    Just follow the messages it gives you when you get the exception. MSDN has a few examples that work well to solve that problem.
                    Works like a charm when released and used outside VS.



                    Thanks a ton - You guys rock!

                    Comment

                    Working...