This is a function i wrote, but it outputs msgbox("error") in the else section.
What is happening in my code: It's a tic tac toe program, when background image of three horizontal panels equal to imagefile in my resources then change label text.
Can anybody help me to figure out the problem?
Function win_status()
If Panel1.Enabled = False And Panel2.Enabled = False And Panel3.Enabled = False Then
If Panel1.BackgroundImage Is My.Resources.ticcross And Panel2.BackgroundImage Is My.Resources.ticcross And Panel3.BackgroundImage Is My.Resources.ticcross Then
lblWinner.Text = "Player 1 Won The Game"
Else
MsgBox("error")
End If
End If
End Function