Skip to content

Changing the visibility property of one form from another

Basu Biswas

Asked Jan 10, 2007, 8:20 PM EST1 answer
Share
LinkedInX
Hi,

I have an windows form....where i m doing authentication.

When a user clicks a button I am showing a login form where i am doing the authentication. If the user is authenticate I need to make the panel visible which the user has clicked before authentication in the main form.

How can I change the property of a form from another form.

If anyone has some idea...do help me...

thanks in advance...

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    Hello,

    I'm new to C#, so I'm not sure if this will work for you, but I thought I'd suggest it anyway....


    frmDetail myForm = new frmDetail();

    foreach (Control c in myForm.Controls)

    {
    if (c.Name == "thisControl")

    { c.Visible = true; }

    }

    myForm.Show();

    0