control.visible

can someone give me an example program for using the control.visible property


Answer this question

control.visible

  • Christian Kuendig

    Referring to the form depends on where you are referring to it from.

    If for instance you referencing it from within code that is contained by the form... so for instance if you’ve got a button click handler for a button sitting on the form, setting the Visible property to false is as easy as:

    private: System::Void button1_Click(System::Object * sender, System::EventArgs * e)

    {

    this->Visible = false;

    }

    If on the other hand you are doing it from another class, you will need to replace the keyword this with the a reference to the form in question.



  • Andreas Sieber

    While it is not a full program, take a look at the example code found on the MSDN page about Control.Visible.

    Hopefully not much more is needed as it is really a simple property as when it is set to true the control/form is visible and when it is set to false it is hidden.

    Is there a specific question or problem that you have with it



  • jdeguenther

    i need to know how to set it. i am trying to make a forms visible property false and i dont know how to refer to the form thus i dont know how to set its properties

  • control.visible