In my winform application; I have login form and main form.
When I run program I want the login form on top and main form behind it.
One more thing is until I do not login properly with username and password, the main form should not be accessible and only the login form should accessible.
My Language is C#.Net.
Please provide idea on how to achieve this?
Use
Form.ShowDialog(Shows the form as a modal dialog box) on the yourForm.OnShownevent (Occurs whenever the form is first displayed):your
ProgramandLoginFormlike this: