Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Delaying Functions
Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
GodofOsiris




PostPosted: Sun Oct 01, 2006 6:41 pm   Post subject: Delaying Functions

How would I delay the application multiple times, then after each time I would make a img visable, what I am wondering is there a way to delay without using a timer, more so like the delay(time) function in turing.
Sponsor
Sponsor
Sponsor
sponsor
NikG




PostPosted: Sun Oct 01, 2006 8:25 pm   Post subject: (No subject)

Ummm... I suppose you could call some temporary function that's just a huge loop or something before continuing...

Why don't you want to use the Timer control? It's actually very flexible (and efficient compared to the above) once you learn how to use it well.
Silent Avenger




PostPosted: Sun Oct 01, 2006 8:35 pm   Post subject: (No subject)

There is no way that I know of that will do that other than the timer. Also as NikG said the timer in VB is very flexible and is alot better than using a delay(time) function.
cool dude




PostPosted: Mon Oct 02, 2006 11:47 am   Post subject: (No subject)

Silent Avenger wrote:
There is no way that I know of that will do that other than the timer. Also as NikG said the timer in VB is very flexible and is alot better than using a delay(time) function.


actaully there is one. you have to make a module and put this code in it

code:

Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)


now everytime you want to delay your program you have to write sleep(1000) and then refresh on the next line. the number in the brackets of sleep (1000) mean how many milliseconds to delay for. you can change it.

code:
sleep(1000)
refresh


hope that helps
Silent Avenger




PostPosted: Mon Oct 02, 2006 3:19 pm   Post subject: (No subject)

cool dude wrote:
actaully there is one.

Well now thanks to you, I do know there is another way.
Remm




PostPosted: Sun Oct 08, 2006 9:10 am   Post subject: (No subject)

Whats the code for this timer control... hehe It could be of use to me.. besides; that sleep one freezes the whole program, unfortionately
cool dude




PostPosted: Sun Oct 08, 2006 11:10 am   Post subject: (No subject)

Remm wrote:
Whats the code for this timer control... hehe It could be of use to me.. besides; that sleep one freezes the whole program, unfortionately


following instructions is very important Wink now make sure its exactly the same as i posted. Note: everytime you use the sleep function you have to refresh! that is your problem
Display posts from previous:   
   Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 7 Posts ]
Jump to:   


Style:  
Search: