making the application wait before closing

sunnyjassal
02-13-2004, 01:48 PM
how would one make the application to wait for like 5 seconds between calls

example:
brwWebBrowser.Document.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER, 0, 0

'In here i want to wait till the document has been sent to the printer
'then i want to close the application

Unload MDIForm1

John
02-13-2004, 01:57 PM
Sleep

HarvestR
02-13-2004, 02:14 PM
Sleep

Orbity, I owe you 3 manas of any color for this API I didn't know ! ;) ;) ;)

This is a way to do it without API.
you can call it with Wait X (X is the number of seconds to wait for)

Public Sub Wait(howlong)
Dim temptime As Variant
temptime = Timer
Do
DoEvents
Loop While Timer < temptime + howlong
End Sub

sunnyjassal
02-13-2004, 02:40 PM
Thank you so much..
it worked so nicely

I really appreciate it

Sleep

Orbity, I owe you 3 manas of any color for this API I didn't know ! ;) ;) ;)

This is a way to do it without API.
you can call it with Wait X (X is the number of seconds to wait for)

Public Sub Wait(howlong)
Dim temptime As Variant
temptime = Timer
Do
DoEvents
Loop While Timer < temptime + howlong
End Sub

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum