Лабораторная работа: Greating game on visual basic with multiplayer system

Call cmsg. WriteString (chatbox. Text)

Call dxplay. Send (MyPlayer, DPID_ALLPLAYERS, DPSEND_GUARANTEED, cmsg)

If chatlabel. Text = "" Then

chatlabel. Text = profilename & ": " & chatbox. Text

Else

chatlabel. Text = chatlabel. Text & vbCrLf & profilename & ": " & chatbox. Text

End If

chatbox. Text = ""

End Sub

Private Sub Timer4_Timer ()

GameUnderway = False

'sets begin to false to stop letters from flashing.

'Updates score and status bar.

Begin = False

If usermode = "host" And multiplayermode = True Then

StatusBar1. SimpleText = "Select Restart Game." & "Game #" & score & " " & profilename & ": " & profilenamescore & " " & opponentsname & ": " & opponentsscore

MyTurn = True

ElseIf usermode = "client" And multiplayermode = True Then

StatusBar1. SimpleText = "Waiting on Host To Restart." & "Game #" & score & " " & profilename & ": " & profilenamescore & " " & opponentsname & ": " & opponentsscore

End If

Timer4. Enabled = False

End Sub

Public Sub x_Click () 'handles menu item X whos turn first

If GameUnderway = True Then

MsgBox "You cannot chang this option while a game is in play", vbOKOnly, "Tic Tac Oops"

Exit Sub

End If

If x. Checked = True Then

sw = True

К-во Просмотров: 870
Бесплатно скачать Лабораторная работа: Greating game on visual basic with multiplayer system