aazamsajid's Content
There have been 5 items by aazamsajid (Search limited from 29-February 20)
By content type
See this member's
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download
There have been 5 items by aazamsajid (Search limited from 29-February 20)
Posted by
aazamsajid
on 09 April 2012 - 10:45 AM
in
C#
Posted by
aazamsajid
on 08 April 2012 - 11:50 AM
in
C#
void check() { if (b[0].Text == b[1].Text && b[1].Text == b[2].Text && b[0].Text != "")// { MessageBox.Show(b[0].Text + " wins"); reset(); } if (b[3].Text == b[4].Text && b[4].Text == b[5].Text && b[3].Text != "")// { MessageBox.Show(b[0].Text + " wins"); reset(); } if (b[6].Text == b[7].Text && b[7].Text == b[8].Text && b[6].Text != "")// { MessageBox.Show(b[0].Text + " wins"); reset(); } if (b[0].Text == b[3].Text && b[3].Text == b[6].Text && b[0].Text != "")// { MessageBox.Show(b[0].Text + " wins"); reset(); } if (b[1].Text == b[4].Text && b[4].Text == b[7].Text && b[1].Text != "")// { MessageBox.Show(b[0].Text + " wins"); reset(); } if (b[2].Text == b[5].Text && b[5].Text == b[8].Text && b[2].Text != "")//6 { MessageBox.Show(b[0].Text + " wins"); reset(); } if (b[0].Text == b[4].Text && b[4].Text == b[8].Text && b[0].Text != "")//7 { MessageBox.Show(b[0].Text + " wins"); reset(); } if (b[2].Text == b[4].Text && b[4].Text == b[6].Text && b[2].Text != "")//8 { MessageBox.Show(b[0].Text + " wins"); reset(); } }
Posted by
aazamsajid
on 08 April 2012 - 09:53 AM
in
C#
Posted by
aazamsajid
on 08 April 2012 - 09:45 AM
in
C#
Posted by
aazamsajid
on 08 April 2012 - 08:46 AM
in
C#
void Form1_Click(object sender, EventArgs e) { Button bt = (Button)sender; if (flag == 0) { bt.Text = "x"; bt.Text.Size = new System.Drawing.Size(30, 20);//this line i am using please correct it with a correct one. flag = 1; } else { bt.Text = "0"; flag = 0; } bt.Enabled = false; t++; check(); if (t == 9) { MessageBox.Show("Draw"); reset(); } }