PC Review


Reply
Thread Tools Rate Thread

Application.Run not creating Main Form

 
 
rettigcd@bigfoot.com
Guest
Posts: n/a
 
      11th Aug 2005
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

 
Reply With Quote
 
 
 
 
Mehdi
Guest
Posts: n/a
 
      11th Aug 2005
On 11 Aug 2005 13:32:33 -0700, (E-Mail Removed) wrote:

> 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.
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a form with main form and subform based on the same table =?Utf-8?B?RXhhciBLdW4=?= Microsoft Access Form Coding 1 3rd Jan 2006 10:23 PM
creating main form with subform Alex Microsoft Access Form Coding 0 2nd Jul 2004 07:13 PM
Creating a toolbar button in one form but not the main Outlook form? Scott Lezberg \(Deltek\) Microsoft Outlook Program Addins 0 26th Jan 2004 03:52 PM
Re: Creating a Main Form Fredg Microsoft Access Forms 0 25th Jul 2003 04:50 PM
Re: Creating a Main Form Kevin @ 3NF Microsoft Access Forms 0 25th Jul 2003 04:43 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:08 PM.