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 7904913
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T10:16:37+00:00 2026-06-03T10:16:37+00:00

In the code below, I open a form with frmContact.ShowDialog(); and then when I

  • 0

In the code below, I open a form with frmContact.ShowDialog(); and then when I close the form by clicking on the OK button in the form it closes, but then it opens again because I have the frmContact.ShowDialog() in the if statement. Could this be done in some oterh way?

        // Button add new customer
    private void btnAdd_Click(object sender, EventArgs e)
    {
        ContactForm frmContact = new ContactForm();

        frmContact.ShowDialog(); // Show the contact form window

        if (frmContact.ShowDialog() == DialogResult.OK)
        {
            MessageBox.Show("OK", "Test", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
        }
    }
  • 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-03T10:16:38+00:00Added an answer on June 3, 2026 at 10:16 am

    Just get rid of the first ShowDialog.

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

Sidebar

Related Questions

I want to open an xlsx file, I have tried the below code,but neither
I have these code below : <form name=submissions action=/ onsubmit=window.open('', 'foo', 'width=900,height=900,status=yes,resizable=yes,scrollbars=yes') target=foo method=post>
I have the code below and everything works but the button click function on
In the below code TextBox value is not getting cleared after clicking on Button.
i use the code below to open a new window when a user drops
I'm trying to open a ZIP file in JAVA. The code below works fine
Below is my code, i tried to open my excel file in my c#
The code below works. But if I comment out the line Dim objRequest As
Ive been using the code below for my auto-completes on my form for a
I have a question about using form_dropdown() . The code below works, but i

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.