[CLIENTE] IP del server sin usar sinfo
Para que lea la IP desde el cliente sin necesidad de sinfo
aparte de servir para no necesitar de ester archivo tmb sirbe para reducir el numero de users con clientes editado ya q asi no veran la ip si no se la mostramos y la unica forma sera usar el ipconfig desde ejecutar ^^
En general mas precisamente en Main buscamos:
Y debajo ponemos esto:
y Luego Buscamos:
y lo borramos
Despues buscamos:
y lo borramos
también esto:
por ultimo en el FrmConnect Borramos los siguientes textbox: IPTxt, lst_servers y PortTxt
esto ultimo es para q no muestre ni la ip ni el puerto en el cliente
Khalem: también borramos:[vb]
Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
'Make Server IP and Port box visible
If KeyCode = vbKeyI And Shift = vbCtrlMask Then
'Port
PortTxt.Visible = True
'Label4.Visible = True
'Server IP
PortTxt.Text = "7666"
IPTxt.Text = "192.168.0.2"
IPTxt.Visible = True
'Label5.Visible = True
KeyCode = 0
Exit Sub
End If
End Sub[/vb] Para que con Ctr+I no nos vean la IP.
Para que lea la IP desde el cliente sin necesidad de sinfo
aparte de servir para no necesitar de ester archivo tmb sirbe para reducir el numero de users con clientes editado ya q asi no veran la ip si no se la mostramos y la unica forma sera usar el ipconfig desde ejecutar ^^
En general mas precisamente en Main buscamos:
Código:
Call CargarServidores
ServersRecibidos = True
Código:
IPdelServidor = Nuestra IP o NO-IP
PuertoDelServidor = 7666
Código:
Public Sub CargarServidores()
On Error GoTo errorH
Dim f As String
Dim C As Integer
Dim I As Integer
f = App.Path & "\init\sinfo.dat"
C = Val(GetVar(f, "INIT", "Cant"))
ReDim ServersLst(1 To C) As tServerInfo
For I = 1 To C
ServersLst(I).desc = GetVar(f, "S" & I, "Desc")
ServersLst(I).Ip = Trim(GetVar(f, "S" & I, "Ip"))
ServersLst(I).PassRecPort = Val(GetVar(f, "S" & I, "P2"))
ServersLst(I).Puerto = Val(GetVar(f, "S" & I, "PJ"))
Next I
CurServer = 1
Exit Sub
errorH:
Call MsgBox("Error cargando los servidores, actualicelos de la web", vbCritical + vbOKOnly, "Argentum Online")
End Sub
Despues buscamos:
Código:
Call CargarServidores
también esto:
Código:
Private Sub lst_servers_Click()
If ServersRecibidos Then
CurServer = lst_servers.ListIndex + 1
IPTxt = ServersLst(CurServer).Ip
PortTxt = ServersLst(CurServer).Puerto
End If
End Sub
esto ultimo es para q no muestre ni la ip ni el puerto en el cliente
Khalem: también borramos:[vb]
Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
'Make Server IP and Port box visible
If KeyCode = vbKeyI And Shift = vbCtrlMask Then
'Port
PortTxt.Visible = True
'Label4.Visible = True
'Server IP
PortTxt.Text = "7666"
IPTxt.Text = "192.168.0.2"
IPTxt.Visible = True
'Label5.Visible = True
KeyCode = 0
Exit Sub
End If
End Sub[/vb] Para que con Ctr+I no nos vean la IP.