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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T22:08:20+00:00 2026-05-28T22:08:20+00:00

Well normally I am quite good at figuring and researching problems without guidance however

  • 0

Well normally I am quite good at figuring and researching problems without guidance however I have come across a snag. I am trying to create an “Event” with C# (which I have not done before) everything I have looked up has nothing to do with what I need.

I am trying to call a class on my main form when form2 is hidden. I found some code which was supposed to check to see if form2 closed – Either I didn’t integrate it into my code properly or closing is different to hiding.

So just to clarify I want to run through the program like this:

  • Form1 runs
  • Click setting button on Form1 which opens Form2
  • Form2 opens where settings can be changed
  • Click the “Ok” button on Form2 (here is where I want Form1 to realise Form2 has been hidden
  • Hide form one and run a class called Refresh which refreshes button names and URLs
  • 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-05-28T22:08:20+00:00Added an answer on May 28, 2026 at 10:08 pm

    Open the second form as modal

    Form2 form2 = new Form2();
    DialogResult result = form2.ShowDialog();
    

    check the result and refresh:

    if (result == DialogResult.OK)
        Refresh();
    

    What you also need to do in this case is when closing the form set DialogResult of the form, for example if you have an OK button, in the button handler set:

    this.DialogResult = DialogResult.OK;
    

    This will automatically close the form as well as I remember correctly.

    What you can also do is set DialogResult.Cancel on cancel button if you need that.

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

Sidebar

Related Questions

I have a long-standing application that I'm normally able to compile equally well from
Well, this is the exact opposite problem that I normally have with Javascript synchronicity
I have this problem (I think it's quite simple, however, I cannot solve it):
I normally don't ask for help. I have spent 3 plus hours trying to
Well, I have a class Customer (no base class). I need to cast from
Well i have a gridview where i have defined the columns on my own
Well i have a transparent div or the background is set to transparent :)
Does anyone know or have good links that explain what iPhone's event loop does
I know, this is [normally] an RTFM question, except, well, we're talking about Authorize.net
Normally getting an unconstructed generic type is quite easy, using typeof : Type genericType

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.