[Last Call] Learn how to a build a cloud-first strategyRegister Now


Parent Form Loose Focus While SubForm Focus?

Posted on 2006-06-07
Medium Priority
Last Modified: 2008-02-01
Yes, I've tried many methods, but nothing seems to work very well.

I have a registration SubForm that opens via a simple class.cs......not directly by the main form

I would like to "Freeze" the main form completely until the registration form is accepted.

I don't want the registration form minimized or anything other kind of sneaky work-around.

Just completely lock-up the main parent form..........

I tried this method in the class.cs

Registration reg = new Registration();
                            reg.TopMost = true;

And used this in combination on the registration form_load

this.TopMost = true;

Question by:kvnsdr
LVL 86

Accepted Solution

Mike Tomlinson earned 1000 total points
ID: 16857643
I don't see what the problem is...

If you show your Registration form using ShowDialog() then the main form will not be accessible until the Registration form is closed.

Set the ControlBox() property of your Registration form to False.  Provide a Button to Accept the entries.  When it is clicked, Hide the form (which cancels the ShowDialog() call from the main form).  If something is missing on the form then pop up a MessageBox and don't hide the form...

Author Comment

ID: 16861060
Must have been a glich in VS, it's working now........

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
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. …
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses
Course of the Month17 days, 23 hours left to enroll

830 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