Connect Four
SolvedConnect Four
@Sketchy: First, at top of your code, change this line:
To
Then, in the frmMain designer, double click btn17. It will create a new event handler. You current one is not recognized by the visual studio, so the new one will become:
Inside that, paste the code you originally wrote for btn17. So, the new sub procedure now will be:
Working fine now.
Code:
Dim grid(6, 7) As System.Windows.Forms.Button
Code:
Dim grid(7, 7) As System.Windows.Forms.Button
Code:
Private Sub btn17_Click_1(sender As System.Object, e As System.EventArgs) Handles btn17.Click End Sub
Code:
Private Sub btn17_Click_1(sender As System.Object, e As System.EventArgs) Handles btn17.Click
PlacePiece7()
CheckForWins()
If PlayerTurn = "Red" Then
PlayerTurn = "Blue"
ElseIf PlayerTurn = "Blue" Then
PlayerTurn = "Red"
End If
End Sub
NP. Marked Solved.

