Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > making the application wait before closing


Reply
 
Thread Tools Display Modes
  #1  
Old 02-13-2004, 01:48 PM
sunnyjassal sunnyjassal is offline
Newcomer
 
Join Date: Feb 2004
Posts: 6
Default making the application wait before closing


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
Reply With Quote
  #2  
Old 02-13-2004, 01:57 PM
John's Avatar
John John is offline
Bit Flipper
 
Join Date: Feb 2002
Location: The Inner Loop
Posts: 5,550
Default

__________________
Subclassing|Magnetic Forms|Operator Overloading (VB2K5)|QuickSnip.NET

"These Patriot playoff wins are like Ray Charles songs, Nantucket sunsets, and hot fudge sundaes. Each one is better than the last." - Dan Shaughnessy
Reply With Quote
  #3  
Old 02-13-2004, 02:14 PM
HarvestR's Avatar
HarvestR HarvestR is offline
Junior Contributor
 
Join Date: Jan 2004
Location: France
Posts: 292
Default

Quote:
Originally Posted by Orbity
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)

Code:
Public Sub Wait(howlong) Dim temptime As Variant temptime = Timer Do DoEvents Loop While Timer < temptime + howlong End Sub
Reply With Quote
  #4  
Old 02-13-2004, 02:40 PM
sunnyjassal sunnyjassal is offline
Newcomer
 
Join Date: Feb 2004
Posts: 6
Default

Thank you so much..
it worked so nicely

I really appreciate it

Quote:
Originally Posted by HarvestR
Quote:
Originally Posted by Orbity
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)

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

Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
closing application or MDIFrame sunnyjassal General 4 02-13-2004 08:19 PM
Closing access application - clicking X on top right rajanikanth_r Word, PowerPoint, Outlook, and Other Office Products 0 12-23-2003 12:13 AM
beginner...help please tweak_hp Game Programming 13 06-06-2003 09:21 AM
Error after closing the application naveenam General 0 09-16-2002 11:07 PM
Global.asa for each application Sylvain Web Programming 7 07-08-2002 09:38 AM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->