凯仔 said:
[STAThread]
Main
{
Application.Run(new Form1());
new Form2().ShowDialog();
}
Form2 can't be show. WhatZ the throuble? it seems no messageloop
The lines above start Form1 as the main form. There's just 1 thread
(STAThread), as most gui's just use 1 thread, so application.run,
starts the form and passes the execution to that form, which then is
the executing code on the single thread of the application. If you also
want to show form2, open it from form1.
Frans
--
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website:
http://www.llblgen.com
My .NET blog:
http://weblogs.asp.net/fbouma
Microsoft MVP (C#)