Hi,

I have 2 forms, Main & About.

When the About form is showing it is TopMost, now I have added code so that when a LinkLabel is clicked on the About form, the About form closes:-

Form.ActiveForm.Close();

This works fine except that the Main form is now TopMost and sits above the opened browser window.

What I am trying to achieve is to change the Main forms WindowState to Minimized just prior to calling the About form close.

I thought that this would work:-

Main.WindowState = FormWindowState.Minimized;

but it doesn't, sadly I am missing something.

Any pointers would be lovely.

Regards..,

MT

Correct me if I am wrong.

this.WindowState = FormWindowState.Minimized;
            Form2 f = new Form2();
            f.TopMost = true;
            f.ShowDialog();
            this.Focus();
            this.WindowState = FormWindowState.Normal;
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.