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

MyTurn = True

End If

Call MainBoard. restart_Click

Case MSG_CHAT 'Handles Chat String input

Dim chatin As String

chatin = dpmsg. ReadString ()

If MainBoard. chatlabel. Text = "" Then

MainBoard. chatlabel. Text = opponentsname & ": " & chatin

Else

MainBoard. chatlabel. Text = MainBoard. chatlabel. Text & vbCrLf & opponentsname & ": " & chatin

End If

Case MSG_STOP 'Handles player disconnected.

MsgBox opponentsname & " has left the game. ", vbOKOnly, "Tic Tac Oops"

MainBoard. mnudisconnect. Enabled = False

MainBoard. newgame. Enabled = True

MainBoard. hostagame. Enabled = True

MainBoard. joinagame. Enabled = True

multiplayermode = False

usermode = "host"

Call CloseDownDPlay

Unload Connect

onconnect = False

End Select

End If

Loop

Exit Sub

' Error handlers

MSGERROR:

MsgBox ("Error reading message. ")

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