Ignore:
Timestamp:
12/11/2008 8:46:47 AM (6 years ago)
Author:
lowjoel
Message:

Force the creation of the main window if the main window is not going to be displayed on the first run.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eraser6/Eraser/Program.cs

    r782 r786  
    174174                //Create the main form 
    175175                program.MainForm = new MainForm(); 
     176                program.MainForm.CreateControl(); 
    176177                bool showMainForm = true; 
    177178                foreach (string param in program.CommandLine) 
     
    286287                    //Initialise and run the program. 
    287288                    if (OnInitInstance(this) && MainForm != null) 
    288                         Application.Run(mainForm); 
     289                        Application.Run(MainForm); 
    289290                    else 
     291                    { 
     292                        //If we aren't showing the form, force the creation of the window 
     293                        //handle. 
     294                        MainForm.CreateControl(); 
     295                        IntPtr handle = MainForm.Handle; 
    290296                        Application.Run(); 
     297                    } 
    291298                    return true; 
    292299                } 
Note: See TracChangeset for help on using the changeset viewer.