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 / .NET Framework / New Users / August 2005

Tip: Looking for answers? Try searching our database.

Application.Run not creating Main Form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
rettigcd@bigfoot.com - 11 Aug 2005 21:32 GMT
Sometimes my main form appears and sometimes it doesn't.  VS.NET acts
as if the process is running and I can click the "stop" button but I
get no windows or forms.

Here is my code:

static void Main() {
    try{
        MainForm frm = new MainForm();
        Application.Run( frm );
    } catch( System.Exception ex ){
        MessageBox.Show( ex.Message );
    }
}

When I debug it, the MainForm constructs just fine but when the
execution enters Application.Run( ), the OnLoad event in never called
and the window doesn't appear.

Then I run it again and it works fine, and I run it again and it
doesn't.

Does anybody have any ideas about how I can figure out what the problem
is.  

thanks,
Dean Rettig
Mehdi - 11 Aug 2005 22:20 GMT
> Sometimes my main form appears and sometimes it doesn't.  VS.NET acts
> as if the process is running and I can click the "stop" button but I
> get no windows or forms.

I very often had this problem with VS 2002 when running the application in
the Debug configuration. Seemed to me like a bug in VS. I've never had this
problem again since i upgraded to VS 2003.

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.