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 / Languages / C# / July 2007

Tip: Looking for answers? Try searching our database.

Running application GUI disappears

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
hermbagger@gmail.com - 26 Jul 2007 07:29 GMT
I wrote a windows application in C# (using visual studio 2003) which
I
am running as an executable on a Windows Server 2003 machine.  The
application runs smoothly for days.  Then out of nowhere, the GUI
diappears and there is no way that I can get back to the GUI.  If I
look at the Task Manager, i can see the process of my application
running, and I can also view log files that my application has
created
continue to grow, but I cannot access the GUI of my applicaiton
anymore.  Does anyone know what is going on and why?

Thanks!!!
herm
Peter Duniho - 26 Jul 2007 08:31 GMT
> I wrote a windows application in C# (using visual studio 2003) which I
> am running as an executable on a Windows Server 2003 machine.  The
[quoted text clipped - 4 lines]
> continue to grow, but I cannot access the GUI of my applicaiton
> anymore.  Does anyone know what is going on and why?

Nope.

It sort of sounds like your form got closed somehow, but you have other  
thread that are not background threads (that is, specifically marked as  
background with the IsBackground property).  It could be as simple as an  
application that doesn't shut things down when the main form gets closed,  
and then some user accidently closing the form, or some sort of bug that  
causes the form to sponaneously close or be hidden.

I would say the first thing to do is override the OnFormClosed method, and  
maybe also the OnVisibleChanged method, and include some sort of logging  
or user alert to help you know if and when the form is closed or hidden.  
If you can reproduce the issue in a debugger-friendly setting, go so far  
as to include a call to Debugger.Break() in those methods, so that the  
application just stops and you can take a look at what's closing the form.

If you want to get really fancy, I suppose you could do some tricks with  
suspending the thread from a different thread, getting a stack trace, and  
then allowing the main thread to continue.  That may be overkill though,  
depending on what else you can do.

Pete

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.