How to set a window?

Posted on 2006-04-08
Medium Priority
Last Modified: 2011-10-03
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.
Question by:ed_dalian

Accepted Solution

osiris247 earned 1500 total points
ID: 16407298
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.
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 16407456
On your form:

   Set FormBorderStyle to None.
   Set TopMost to True.
   Set StartPosition to CenterScreen.

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses
Course of the Month15 days, 19 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question