I made a form with a textbox for a user to enter a password and if the password is "hello", it'll reveal the pictureBox. I have the pictureBox visibility set to false. I have no clue how to do this, and have looked just about everywhere with no luck (yes, I'm a beginner).
public partial class Form2 : Form
{
string secretPassword = "hello";
public event EventHandler VisibleChanged;
public Form2()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
if (textBox1.Text == secretPassword)
{
pictureBox1.VisibleChanged+= new EventHandler(this.PictureBox1_VisibleChanged) ;
}
}