Friday, 23 August 2013

Forms are not displayed - program.cs

Forms are not displayed - program.cs

I tried something like that :
Start a Form as dialog and ask user about warranty
If users click OK, Form is returning DialogResult.OK
Form1 is starting from program.cs
That is the code of my program.cs :
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Form f = new Form2();
if(f.DialogResult == DialogResult.OK)
Application.Run(new Form1());
I don' t know why that doesn't work. Any form isn't shown.

No comments:

Post a Comment