01-06-2006, 08:58 PM
Difficuly: 2/5
Only Client Side:
1st make a new form and name it frmIpconfig
Make 2 txtBoxes named txtIP and txtPort
Make 2 picBoxes named picConfirm and picCancel
In the code put the following:
[code]Option Explicit
Private Sub Form_Load()
Dim FileName As String
FileName = App.Path & "\config.ini"
txtIP = ReadINI("IPCONFIG", "IP", FileName)
txtPort = ReadINI("IPCONFIG", "PORT", FileName)
End Sub
Private Sub picCancel_Click()
frmMainMenu.Visible = True
frmIpconfig.Visible = False
End Sub
Private Sub picConfirm_Click()
Dim IP, Port As String
Dim fErr As Integer
Dim Texto As String
IP = txtIP
Port = Val(txtPort)
fErr = 0
If fErr = 0 And Len(Trim(IP)) = 0 Then
fErr = 1
Call MsgBox("Inform a correct IP.", vbCritical, GAME_NAME)
Exit Sub
End If
If fErr = 0 And Port
Only Client Side:
1st make a new form and name it frmIpconfig
Make 2 txtBoxes named txtIP and txtPort
Make 2 picBoxes named picConfirm and picCancel
In the code put the following:
[code]Option Explicit
Private Sub Form_Load()
Dim FileName As String
FileName = App.Path & "\config.ini"
txtIP = ReadINI("IPCONFIG", "IP", FileName)
txtPort = ReadINI("IPCONFIG", "PORT", FileName)
End Sub
Private Sub picCancel_Click()
frmMainMenu.Visible = True
frmIpconfig.Visible = False
End Sub
Private Sub picConfirm_Click()
Dim IP, Port As String
Dim fErr As Integer
Dim Texto As String
IP = txtIP
Port = Val(txtPort)
fErr = 0
If fErr = 0 And Len(Trim(IP)) = 0 Then
fErr = 1
Call MsgBox("Inform a correct IP.", vbCritical, GAME_NAME)
Exit Sub
End If
If fErr = 0 And Port