Posted
this is what i got so far but it just open the form even tho i didnt type anything
private void button1_Click(object sender, EventArgs e)
{
if (textBox1.Text != "coco")
{
Form1 form = new Form1();
form.Show();
this.Hide();
}
else
MessageBox.Show("Wrong key");
Replied
you're using the not equals operator ( != )
Cancel
Post
Replied
Just do
private void button1_Click(object sender, EventArgs e)
{
if (textBox1.Text == "coco")
{
new Form1().Show();
this.Hide();
return;
}
MessageBox.Show("Wrong key");
}Cancel
Post
Discord : Doctor Doom#0550
Replied
wrong usage of !=
"==" means equals to
"!=" means does not equals to
Cancel
Post
Users viewing this thread:
( Members: 0, Guests: 1, Total: 1 )
Cancel
Post