Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to "Wait" in VB6

Posted on 1999-06-27
4
Medium Priority
?
13,297 Views
Last Modified: 2008-03-17
Hi
If I want to wait 10 seconds in a function without locking the whole program, how to do?? I think there should be a "wait" function...
if I use SleepAPI, it will lock the program.
or how to implement it by Timer
Thanks
C8X
0
Comment
Question by:C8X
[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
4 Comments
 
LVL 1

Accepted Solution

by:
SiriusP earned 150 total points
ID: 1520013
Write your function

Function Name (params)
  code here
  timer1.interval = 10000
  timer1.enabled = true
  'write the rest of the code in the timer section
end function

sub timer1_timer
  put code here
  timer1.enabled = false
end sub
0
 
LVL 7

Expert Comment

by:Inteqam
ID: 1520014
very nice idea

0
 
LVL 1

Expert Comment

by:SiriusP
ID: 1520015
you're welcome
and if your function uses a parameter,
you can always use the timer1.tag as a variable
0
 

Author Comment

by:C8X
ID: 1520016
That means there are no "wait" functions in VB?
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

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…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

722 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