Android Question Pause [wrong - to be deteled]

Discussion in 'Android Questions' started by LucaMs, Sep 15, 2018.

  1. LucaMs

    LucaMs Expert Licensed User

    Last edited: Sep 16, 2018
    Filippo likes this.
  2. Filippo

    Filippo Expert Licensed User

    Without DoEvents, that's magic! :D

    Thank you LucaMs! :)
    LucaMs likes this.
  3. MarkusR

    MarkusR Well-Known Member Licensed User

    would not sleep(5000) the same?
    Erel and LucaMs like this.
  4. Erel

    Erel Administrator Staff Member Licensed User

    This is a common mistake to try to "wrap" sleep with a sub that only makes the usage more complicated.

    As MarkusR wrote you should instead use Sleep directly. It will be simpler and more efficient.
  5. Erel

    Erel Administrator Staff Member Licensed User

    That's true. However there isn't any other code that will allow it (without using the problematic DoEvents) as holding the main thread is a bad idea.

    I've moved it to the questions forum. I prefer not to delete complete discussions. This is indeed a common mistake. If I remember correctly I even talk about it in the video tutorial.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice