Hi Sariq,
The problem lies within your code inside the method you specified: "neval()":
public void neval()
{
while (textBox2.Text == "")
{
if (textBox1.Text == "")
{
pictureBox1.Visible = false;
}
}
}
You've used a while which is causing the form hangup. While takes the condition in a loop and keep evaluating until the condition results in a false. In your case if you leave the Textbox 2 empty it always results true causing the form to hangup.
Just replace "while" with "If" as below and it should work fine:
public void neval()
{
If (textBox2.Text == "")
{
if (textBox1.Text == "")
{
pictureBox1.Visible = false;
}
}
}
Hope this helps!
Happy Coding :)
Sunny K