OPEN SOURCE - UNARIX./NAHUEL TELLO - AŅO: 2003


Option Explicit
Dim BackSpace As Boolean
Dim Spacio As Boolean
Dim i As Integer
Dim doo As Boolean
Dim nick As String
Dim ip As String

Private Sub CMDLIRIX_Click()
WB1.Navigate App.Path & "/index.html"
End Sub

Private Sub Command1_Click()
If TxtNick.Text = "" Then
MsgBox "falta nick"
Exit Sub
End If
nick = TxtNick.Text
tcpCliente.Connect
Text1.Enabled = True
Text1.SetFocus
End Sub


Private Sub Form_Load()
ip = TxtIp.Text
tcpCliente.RemoteHost = ip
tcpCliente.RemotePort = "1080"
WB1.Navigate App.Path & "/index.html"
End Sub

Private Sub Label7_Click()
Me.Width = 15090
Label7.Visible = False
End Sub

Private Sub Label8_Click()
Me.Width = 11745
Label7.Visible = True
End Sub

Private Sub MnuEditar_Click()

End Sub

Private Sub tcpCliente_DataArrival(ByVal bytesTotal As Long)
Dim strDatos As String
tcpCliente.GetData strDatos
LstCliente.AddItem strDatos
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
On Error GoTo etiqueta
If KeyAscii = 13 Then
    If tcpCliente.State = 0 Then
    MsgBox "Usted se encuentra desconectado", vbInformation, ""
    Else
    tcpCliente.SendData nick & " : " & Text1.Text
    Text1.Text = ""
    End If
End If
Exit Sub
etiqueta:
MsgBox "no se entrego pudo entregar el mensage.", vbInformation, "UPS!"
End Sub

Private Sub TxtIp_Change()
Command1.Enabled = True
End Sub

Private Sub TxtNick_Change()
Command1.Enabled = True
End Sub



Private Sub cboURL_Change()

Dim nSel As Long

If BackSpace = True Or Spacio = True Then
    BackSpace = False
    Spacio = False
    Exit Sub
End If

For i = 0 To cboURL.ListCount - 1

If InStr(1, cboURL.List(i), cboURL.Text, vbTextCompare) Then
    nSel = cboURL.SelStart
    cboURL.Text = cboURL.List(i)
    cboURL.SelStart = nSel
    cboURL.SelLength = Len(cboURL.Text) - nSel
End If

Next i

End Sub

Private Sub cboURL_GotFocus()
Dim startx As Long
cboURL.SelStart = startx
cboURL.SelLength = Len(cboURL.Text)
End Sub

Private Sub cboURL_KeyPress(KeyAscii As Integer)
doo = False
If KeyAscii = 32 Then
    Spacio = True
End If

If KeyAscii = 8 Then
    BackSpace = True
End If

If KeyAscii = 13 Then
    If cboURL.Text = "" Then
        Exit Sub
    End If
    
    
    
    For i = 0 To cboURL.ListCount

        If cboURL.Text = cboURL.List(i) Then
            cmdGo_Click
            doo = True
            Exit Sub
        End If

    Next i
    
    If doo = False Then
        cboURL.AddItem cboURL.Text
    End If
    
End If


End Sub

Private Sub CmdActualizar_Click()
WB1.Refresh
End Sub

Private Sub cmdGo_Click()
WB1.Navigate cboURL.Text
'Timer1.Interval = 10
End Sub

Sub NoseUsa()

For i = 1 To cboURL.ListCount + 1

texto = cboURL.Text & "*"
siLike = cboURL.List(i) Like texto
    If siLike = True Then
            Text1.Text = cboURL.List(i)
    End If
Next i

End Sub



Private Sub Timer1_Timer()
'ALTERNATIVA:

'WB1.Document

    If WB1.Busy = True Then
        Shape1.BackColor = vbRed
    Else
        Shape1.BackColor = vbGreen
    End If
End Sub


Private Sub Toolbar1_ButtonClick(ByVal Button As ComctlLib.Button)
Select Case Button
Case 1
On Error Resume Next
WB1.GoBack
Case 2
On Error Resume Next
WB1.GoForward
Case 3
WB1.Refresh
Case 4
WB1.Stop
Case 5
WB1.GoHome
End Select
End Sub

Private Sub WB1_StatusTextChange(ByVal Text As String)
WB1.MenuBar = True
End Sub

    Source: geocities.com/ar/naronar

               ( geocities.com/ar)