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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T03:53:22+00:00 2026-06-06T03:53:22+00:00

how do I check if a form is closed? I want to reload a

  • 0

how do I check if a form is closed?

I want to reload a listview’s items when I close another form.
What I’m doing is:

Form1 = form with ListView
Form2 = form with TextBoxes

  • Opening a new form.
  • Creating a new folder via a textbox.
  • When I press “Add” in Form2 I want to reload the “ListView” on Form1.

So how am I supposed to do this?

And sorry for my bad English :(.

  • 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-06T03:53:24+00:00Added an answer on June 6, 2026 at 3:53 am

    The simplest answer is to make a public method on Form1, let’s call it RefreshList() and in your button click event on Form2, you simply call Form1.RefreshList. Here’s a quick sample:

    Form 2:

    public Form1 ParentForm { get; set; }
    
    private void Button_Click(object Sender, EventArgs args) {
    {
        // After the rest of your handler
        if(ParentForm != null)
            ParentForm.RefreshList();
    
        Close(); // Close Form2 here, we're done!
    }   
    

    Form 1:

    private void ShowForm2() 
    {
        Form2 form2 = new Form2();
        form2.ParentForm = this;
        form2.Show();
    }
    
    public void RefreshList() 
    {
       // do your refresh here
    }
    

    Initially you mention that you want to do this when Form2 closes, but then later you mention that you want to do it “When I press “Add” in Form2 I want to reload the “ListView” on Form1.” As others have mentioned, you can use the Closed event, so I took this approach to address your second case.

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

Sidebar

Related Questions

Pls check code .html form gets submitted even if javascript returns false. <form id=form1
How do you check for a close event for an MDI child form when
I'm trying to check if a form input has any value (doesn't matter what
In the onload of the form I check which type the form has and
Is there a way to check if the form that has been loaded with
Normally you use Form.Visible to check if Window is visible at all. But sometimes
I have a form which have many check boxes in it. User will check
Check out this jsbin . I have a form with a custom button that
I have a login form but I wanna check if the fields are empty
I have an file upload form and need to run a check on the

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.