How to set a window?

I have a windows application, I want to set my form in front of any forms, and set it coundn't be moved or minimized. It just could be show as it initialize.
Who is Participating?
like this....

Form1 fm = new Form1();
fm.ShowDialog(); //this will keep the focus until the form has closed, also wont let the user do anything else within your app. until Form1 has been closed.

Form1 properties.
Change the FormBorderStyle to FixedDialog //this will stop resizing.
Disable the controlbox. // this will remove min, max, close buttons.

Hope this helps.
Mike TomlinsonMiddle School Assistant TeacherCommented:
On your form:

   Set FormBorderStyle to None.
   Set TopMost to True.
   Set StartPosition to CenterScreen.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.