Click here to Skip to main content
15,891,981 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# .net mass emailer Pin
BobJanova22-Aug-11 23:51
BobJanova22-Aug-11 23:51 
GeneralRe: C# .net mass emailer Pin
markymark8223-Aug-11 0:01
markymark8223-Aug-11 0:01 
GeneralRe: C# .net mass emailer Pin
jschell23-Aug-11 9:31
jschell23-Aug-11 9:31 
QuestionPlease tell me what this silverlight warning message means. Pin
Xarzu21-Aug-11 22:59
Xarzu21-Aug-11 22:59 
AnswerRe: Please tell me what this silverlight warning message means. Pin
Simon Bang Terkildsen21-Aug-11 23:44
Simon Bang Terkildsen21-Aug-11 23:44 
QuestionRun Multiple Forms Pin
share_holder21-Aug-11 22:45
share_holder21-Aug-11 22:45 
AnswerRe: Run Multiple Forms Pin
Wayne Gaylard21-Aug-11 23:00
professionalWayne Gaylard21-Aug-11 23:00 
AnswerRe: Run Multiple Forms [modified] Pin
Shameel21-Aug-11 23:39
professionalShameel21-Aug-11 23:39 
Application.Run is used to start a message loop on the current thread. To show multiple forms, you must use the Show method of the Form class. You can do it from the Main method like this:
C#
Form2 f2 = new Form2();
f2.Show();
Form3 f3 = new Form3();
f3.Show();

Form1 f1 = new Form1();
Application.Run(f1);


But as soon as your instance of Form1 is closed, the application will exit.

EDIT: Made some changes as suggested by BillWoddruff and Luc Pattyn.
"Don't confuse experts with facts" - Eric_V
modified on Monday, August 22, 2011 9:58 AM

GeneralRe: Run Multiple Forms Pin
BillWoodruff22-Aug-11 3:34
professionalBillWoodruff22-Aug-11 3:34 
GeneralRe: Run Multiple Forms Pin
Luc Pattyn22-Aug-11 3:49
sitebuilderLuc Pattyn22-Aug-11 3:49 
GeneralRe: Run Multiple Forms Pin
Shameel22-Aug-11 4:04
professionalShameel22-Aug-11 4:04 
GeneralRe: Run Multiple Forms [modified] Pin
BillWoodruff22-Aug-11 20:24
professionalBillWoodruff22-Aug-11 20:24 
GeneralRe: Run Multiple Forms Pin
Luc Pattyn23-Aug-11 1:45
sitebuilderLuc Pattyn23-Aug-11 1:45 
GeneralRe: Run Multiple Forms Pin
Shameel22-Aug-11 4:03
professionalShameel22-Aug-11 4:03 
GeneralRe: Run Multiple Forms Pin
BillWoodruff22-Aug-11 20:35
professionalBillWoodruff22-Aug-11 20:35 
AnswerRe: Run Multiple Forms Pin
share_holder21-Aug-11 23:53
share_holder21-Aug-11 23:53 
GeneralRe: Run Multiple Forms Pin
BillWoodruff22-Aug-11 3:44
professionalBillWoodruff22-Aug-11 3:44 
AnswerRe: Run Multiple Forms Pin
share_holder22-Aug-11 1:14
share_holder22-Aug-11 1:14 
GeneralRe: Run Multiple Forms Pin
Not Active22-Aug-11 2:14
mentorNot Active22-Aug-11 2:14 
GeneralRe: Run Multiple Forms Pin
share_holder22-Aug-11 21:16
share_holder22-Aug-11 21:16 
AnswerRe: Run Multiple Forms [modified] Pin
BillWoodruff22-Aug-11 3:17
professionalBillWoodruff22-Aug-11 3:17 
GeneralRe: Run Multiple Forms Pin
share_holder22-Aug-11 21:15
share_holder22-Aug-11 21:15 
GeneralRe: Run Multiple Forms Pin
BillWoodruff22-Aug-11 21:28
professionalBillWoodruff22-Aug-11 21:28 
GeneralRe: Run Multiple Forms Pin
share_holder22-Aug-11 21:33
share_holder22-Aug-11 21:33 
GeneralRe: Run Multiple Forms Pin
share_holder23-Aug-11 1:39
share_holder23-Aug-11 1:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.