Категория
Информатика
Тип
лабораторная работа
Страницы
18 стр.
Дата
08.08.2009
Формат файла
.rtf — Rich Text Format (Wordpad)
Архив
107276.zip — 631.19 kb
  • greating-game-on-visual-basic-with-multiplayer-system_107276_1.rtf — 0 Bytes
  • greating-game-on-visual-basic-with-multiplayer-system_107276_2.rtf — 0 Bytes
Рейтинг
10  из 10
Оценок
1
Оцените работу
Хорошо  или  Плохо


Текст работы

Без интервала;
;
AUTOMATIC SYSTEM XTreme Diapsalmata
2
AUTOMATIC SYSTEM
G REATING GAME ON VISUAL BASIC WITH MULTIPLAYER SYSTEM
Dushanbe, 2009
Main Interface
Source Code
Public lanchoice As Long 'address
Public details As String 'names
Public connected As Boolean 'if connected
Private Sub Form_Load ( )
Connect . Icon = LoadResPicture
(" ictac ",
vbResIcon ) 'form icon
If usermode = " host "
Then
join . Enabled = False
Else
host . Enabled = False
gamename . Visible = False
Label5 . Visible = False
End If
End Sub
Private Sub Form_QueryUnload ( Cancel As Integer, UnloadMode As Integer )
'call on form cancel or exit by control box on form
If connectionmade = False Then
MainBoard . hostagame .
Enabled = True
MainBoard . joinagame .
Enabled = True
Call CloseDownDPlay
multiplayermode = False
End If
MainBoard . Enabled = True
End Sub
Private Sub host_Click ( )
On Error GoTo NO_Hosting ' error handler in case creating host fails
If playersname = "" Or gamename = ""
Then
MsgBox " You must enter a Players name and Game Name ",
vbOKOnly, " Tic Tac Oops"
Exit Sub
End If
Call goplay 'starts direct play object
Dim address As DirectPlayAddress
'Selects which choice was made for lan
Set address = EnumConnect . GetAddress ( lanchoice )
'Binds address to directplay connection
Call dxplay . InitializeConnection ( address )
'Starts sessiondata information
Dim SessionData As DirectPlaySessionData



Ваше мнение



CAPTCHA