Show Dialog Question
- by Michael Quiles
How can I get the Xwinnerform to stay on top an keep the main form from being clicked, I tried ShowDialog but I cant get it to work.
static public bool CheckWinner(Button[] myControls)
{
//bolean statement to check for the winner
bool gameOver = false;
for (int i = 0; i < 8; i++)
{
int a = Winners[i, 0];
int b = Winners[i, 1];
int c = Winners[i, 2];
Button b1 = myControls[a], b2 = myControls[b], b3 = myControls[c];
if (b1.Text == "" || b2.Text == "" || b3.Text == "")
continue;
if (b1.Text == b2.Text && b2.Text == b3.Text)
{
xWinnerForm xWinnerForm = new xWinnerForm();
xWinnerForm.ShowDialog(b1.Text + " is the Winner");
}
}
return gameOver;
}
enter code here