Show Dialog Question
Posted
by Michael Quiles
on Stack Overflow
See other posts from Stack Overflow
or by Michael Quiles
Published on 2010-05-24T16:49:35Z
Indexed on
2010/05/24
17:01 UTC
Read the original article
Hit count: 191
c#
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
© Stack Overflow or respective owner