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

  • Home
  • SEARCH
  • 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 8886209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:30:09+00:00 2026-06-14T21:30:09+00:00

I have an application with a Panel containing children Form objects. When I click

  • 0

I have an application with a Panel containing children Form objects. When I click one of the children Form it brings to front. I would like to know which one is in front now…
I’ve looked in event list but cant find proper event form my purpose 🙁

These methods doesn’t work:

    protected void OpenedFileForm_Enter(object sender, EventArgs e)
    {
        MessageBox.Show("enter");
    }

    protected void OpenedFileForm_Click(object sender, EventArgs e)
    {
        MessageBox.Show("click");
    }

    protected void OpenedFileForm_Activated(object sender, EventArgs e)
    {
        MessageBox.Show("activated");
    }

    protected void OpenedFileForm_MouseClick(object sender, MouseEventArgs e)
    {
       MessageBox.Show("mouse click");
    }

    protected void OpenedFileForm_Shown(object sender, EventArgs e)
    {
        MessageBox.Show("shown");
    }

enter image description here

        OpenFileDialog openFile1 = new OpenFileDialog();

        openFile1.DefaultExt = "*.txt";
        openFile1.Filter = "TXT Files|*.txt|RTF Files|*.rtf";

        if (openFile1.ShowDialog() == System.Windows.Forms.DialogResult.OK &&
           openFile1.FileName.Length > 0)
        {

            switch (Path.GetExtension(openFile1.FileName))
            {

                case ".txt":
                    txtForm childTXT = new txtForm();
                    this.childForms.Add(childTXT);
                    childTXT.Parent = this.mainPanel;              
                    childTXT.richTextBox1.LoadFile(openFile1.FileName, RichTextBoxStreamType.PlainText);                                               
                    childTXT.Show();
                    break;
            }


        }
  • 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-14T21:30:11+00:00Added an answer on June 14, 2026 at 9:30 pm

    Have you tried the Form.Activated Event?

    http://msdn.microsoft.com/en-us/library/system.windows.forms.form.activated(v=vs.80).aspx

    Edit:

    If you are in an MDI application, you might need to use MdiChildActivate instead.

    http://msdn.microsoft.com/en-us/library/system.windows.forms.form.mdichildactivate.aspx

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

Sidebar

Related Questions

I have a preferences panel in my application in which I have a NSColorWell
I am working on asp.net application and I have an update panel like this:
I have an application on which I show configuration panel (QFrame) to setup the
I have an application that has multiple panels; I would like to have the
I have an application where I would like to get the volume coordinates from
I have an application with one main form. In the form I have one
I have an application that contains many controls on a panel, each with its
I have application which uses Sherlock ActionBar package. The application uses platform-specific behavior for
I have application which needs to use a dll (also written by me) which
I have a JScrollPane containing a panel with a BoxLayout (PAGE AXIS). My problem

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.