Private Sub dataGridView1_CellClick(ByVal sender As Object, _
ByVal e As DataGridViewCellEventArgs) _
Handles dataGridView1.CellClick
If turn.Text.Equals(gameOverString) Then Return
Dim cell As DataGridViewImageCell = _
CType(dataGridView1.Rows(e.RowIndex). _
Cells(e.ColumnIndex), DataGridViewImageCell)
If (cell.Value Is blank) Then
If IsOsTurn() Then
cell.Value = o
Else
cell.Value = x
End If
ToggleTurn()
ToolTip(e)
End If
If IsAWin() Then
turn.Text = gameOverString
End If
End Sub
Date :
2013-10-06 07:02:52
By :
mr.win
No. 2
Guest
If turn.Text.Equals(gameOverString) Then Return ไม่เข้าใจค่ะ อธิบายหน่อยนะค่ะมือใหม่จิงๆๆค่ะ
Private Sub DataGridView_CellMouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles DataGridView.CellMouseUp
Dim _status as string=""
If e.RowIndex = -1 Then Exit Sub
_status = DataGridView.Rows(e.RowIndex).Cells(4).Value
if _status="รอติดตั้ง" then
buttonprint.enabled=false
else
buttonprint.enabled=false
end if
end sub