Announcement

Collapse
No announcement yet.

Program unresponsive getting too much sleep

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Program unresponsive getting too much sleep

    Is your program beginning to feel groggy because of too much sleep?
    Unable to resize and move dialogs during long sleep times?
    This may give it a boost. Minimum sleep is 10 miliseconds.

    Code:
    Sub Sleepy(milliseconds As Long) 'a better sleep
      Dim x As Long, Counter As Long
      Counter = (milliseconds \ 11) + 1  'minimum 1 loop (10 milliseconds)
      For x = 1 To Counter
        DIALOG DoEvents
        Sleep 10
      Next
    End Sub
    'Not sure the same thing is done with this?
    Code:
    DIALOG DOEVENTS [sleep&] [TO count&]
    Last edited by Mike Doty; 21 May 2009, 04:43 PM.
    How long is an idea? Write it down.
Working...
X