Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / February 2005

Tip: Looking for answers? Try searching our database.

Forms - Can I automatically close the form after 5 minutes (but only if there is an exception.)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Joe Fallon - 25 Feb 2005 23:01 GMT
I have a form that runs a batch task. (say every 15 minutes)

When it is kicked off it connects to the DB and then runs through all of the
things it is supposed to do.
The length of time to complete these tasks is unknown in advance.
If it finishes all of the tasks without error then the application exits.
The UI never appeared on screen at any time.

However, if there is an exception (such as not able to connect to DB) then
my global exception handler traps it and the screen appears with the error
message on it. This error is most likely to occur during initial setup when
someone is sitting at the server. But later on, there may not be anyone
looking at the server for days at a time. I would like to show the form for
5 minutes (or until a user clicks Close) and then have it automatically
close itself. If it does not get closed then dozens of copies of the form
could appear on screen until someone finally notices the problem. I want to
avoid this.

I am open for any advice on how to accomplish this.
Thanks!
Signature

Joe Fallon

Piotrek - 26 Feb 2005 13:42 GMT
If I understand well you should:
1. Create form that closes itself after 5 minutes (for example using Timer)
2. catch DB exception and show this form ?
and thats all ?
Signature

regards
piotrek


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.