Solved

Sleep

Posted on 2006-11-25
3
332 Views
Last Modified: 2010-04-30
I have an app that I am checking another file on a server, I am doing a ton of things in between, and on the server end, but my app doesnt take into effect the server ends processing time (can take upto 2-5 seconds) so I put a Sleep function in....

The progress bar works fine, but the text does not it just shows the last message only.

Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Updater.currentmessage = "Establishing Connection"
ProgressBar.Value = 10
Sleep (2000)
Updater.currentmessage = "Connection Established"
ProgressBar.Value = 20
Sleep (2000)
Updater.currentmessage = "Checking Versions"
ProgressBar.Value = 30
0
Comment
Question by:B_Dorsey
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 29

Accepted Solution

by:
Nightman earned 75 total points
ID: 18012060
Try this (by placing the DoEvents statement before each sleep statement)

Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Updater.currentmessage = "Establishing Connection"
ProgressBar.Value = 10
DoEvents
Sleep (2000)
Updater.currentmessage = "Connection Established"
ProgressBar.Value = 20
DoEvents
Sleep (2000)
Updater.currentmessage = "Checking Versions"
ProgressBar.Value = 30
DoEvents
0
 
LVL 14

Author Comment

by:B_Dorsey
ID: 18012067
OMGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG!

To think I stayed up all night for that...... Im a LOSER! ...lol

VERY BIG THANKS

b
0
 
LVL 29

Expert Comment

by:Nightman
ID: 18012074
Don't knock yourself - usually a second pair of eyes makes a world of difference.

I wasted 3 hours the other day debugging and getting frustrated, only to finally figure out I was connected to the wrong database;)
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question