Wrox Programmer Forums
|
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 3rd, 2007, 04:02 PM
Authorized User
 
Join Date: Nov 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Wait In VB

Hi Everyone,

I need help to make a vb program wait for 2 minutes, I have used sleep but i want to use something more effective. Any respond will be most helpful, thank you.


arshad Mehmood
__________________
arshad Mehmood
 
Old February 4th, 2007, 11:00 AM
Friend of Wrox
 
Join Date: May 2006
Posts: 643
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It depends on what you mean by "wait", and what you mean by more effective.

What behavior do you want your application to do?

You can use a timer in several ways to implement various kinds of waiting behavior.

Woody Z
http://www.learntoprogramnow.com
 
Old February 4th, 2007, 11:35 AM
Authorized User
 
Join Date: Nov 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I want the program to do nothing for about 2 minute.
The sleep method makes the whole program non responsive. After the 2 minutes the program should carry out as set of tasks then wait 2 minutes and then carry out the tasks again and so on.


arshad Mehmood
 
Old February 5th, 2007, 08:28 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

well then use a timer control...

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
 
Old February 5th, 2007, 11:32 AM
Friend of Wrox
 
Join Date: May 2006
Posts: 643
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yup. Use the timer. However - the sleep is doing exactly what you describe: "I want the program to do nothing for about 2 minute."
You might want to better define your requirement. Is it that you want the user to be able to do other things while the program is not doing the things that are supposed to happen every two minutes?

Being able to describe the funtionality that you DO want will make it a lot easier for someone to help you.

Woody Z
http://www.learntoprogramnow.com
 
Old February 6th, 2007, 11:47 AM
Authorized User
 
Join Date: Nov 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the help.





Similar Threads
Thread Thread Starter Forum Replies Last Post
"Wait" function in VBA wscheiman Access VBA 15 December 18th, 2010 05:16 PM
wait for seconds pzmrcd C# 1 August 1st, 2007 02:06 PM
Should I wait for .net 2 androoo ADO.NET 2 November 3rd, 2004 09:07 AM
help me! wait online EdmondWang All Other Wrox Books 1 December 18th, 2003 06:16 AM
"please wait" ASP page tgoodfellow Classic ASP Basics 12 December 13th, 2003 10:55 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.