Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9226701
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T04:53:35+00:00 2026-06-18T04:53:35+00:00

I would like to make a form that, when opened, locks the user to

  • 0

I would like to make a form that, when opened, locks the user to only using that form until closed.

I see this done in many programs that have a “settings.” You open the new form and if you try to click back on the old one, the new one pops back up and makes a beeping sound.

And just wondering, what exactly is this called, just do I don’t have to reference it as a “Form that locks the main form”?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T04:53:36+00:00Added an answer on June 18, 2026 at 4:53 am

    You need to use the ShowDialog method to do this. This will lock the parent form like your are wanting. Here is some sample code that will show you how to do this (all it does is check a textbox‘s content in form2, which is shown as a modal dialog to prevent the parent form from being used:

    public void ShowMyDialogBox()
    {
       Form2 testDialog = new Form2();
    
       // Show testDialog as a modal dialog and determine if DialogResult = OK.
       if (testDialog.ShowDialog(this) == DialogResult.OK)
       {
          // Read the contents of testDialog's TextBox.
          this.txtResult.Text = testDialog.TextBox1.Text;
       }
       else
       {
          this.txtResult.Text = "Cancelled";
       }
       testDialog.Dispose();
    }
    

    Sample code copied from here: http://msdn.microsoft.com/en-us/library/system.windows.forms.form.showdialog(v=vs.71).aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to make a form in HTML where a user enters some
A simple html question i would like to make form that shows a different
I would like to make a transparent cut out half circle shape using only
I have a form that I would like to make printer friendly in a
I would like to make a form with this kind of grid : Do
I would like to make editing form fields as user-friendly as possible. For example,
I would like to make a checkbox form that has both mouse over image
I would like to make my windows form app self updating when it starts.
I would like to make an entire inline formset within an admin change form
I have a form which includes a data sheet. I would like to make

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.