My problem is this.: I have the following code in my form;
This should open form2, then, depending on which button is pressed, should either set quit (integer) to 0. but when i run my program, and click the button to activate this code, the form2 displays correctly, i click the button to set quit, then the dialog box closes, then reappears. i then click the button again, it goes away and sets quit. Why and what am i doing wrong?
VB.NET:
Dim add As New Form2()
add.ShowDialog(Me)
If add.ShowDialog = DialogResult.OK Then
quit = 0
End If
This should open form2, then, depending on which button is pressed, should either set quit (integer) to 0. but when i run my program, and click the button to activate this code, the form2 displays correctly, i click the button to set quit, then the dialog box closes, then reappears. i then click the button again, it goes away and sets quit. Why and what am i doing wrong?