Tutorial by Examples

After defining the structure of your form with the WinForms designer you can display your forms in code with two different methods. Method - A Modeless form Form1 aForm1Instance = new Form1(); aForm1Instance.Show(); Method - A Modal Dialog Form2 aForm2Instance = new Form2(); aF...
A modeless form is employed (usually) when you need to shows something permanentely alongside your application main screen (think about a legend or an view on a stream of data coming asynchronously from a device or an MDI Child Window). But a modeless form poses an unique challenge when you want t...
When a form is shown using the ShowDialog method, it is necessary to set the form's DialogResult property to close to form. This property can be set using the enum that's also called DialogResult. To close a form, you just need to set the form's DialogResult property (to any value by DialogResult.N...

Page 1 of 1