home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form frmHTML
- Caption = "HTML Source Viewer"
- ClientHeight = 8340
- ClientLeft = 210
- ClientTop = 1575
- ClientWidth = 12660
- Height = 8745
- Left = 150
- LinkTopic = "Form1"
- ScaleHeight = 8340
- ScaleWidth = 12660
- Top = 1230
- Width = 12780
- Begin dsSocket dsSocket1
- DataSize = 30000
- Left = 270
- Linger = 0 'False
- LocalPort = 0
- RemoteDotAddr = ""
- RemoteHost = ""
- RemotePort = 0
- ServiceName = ""
- Timeout = 0
- Top = 720
- End
- Begin TextBox txtAnchor
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 360
- Left = 900
- TabIndex = 0
- Top = 90
- Width = 6360
- End
- Begin TextBox txtHTML
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 12
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 7755
- Left = 45
- MultiLine = -1 'True
- ScrollBars = 2 'Vertical
- TabIndex = 1
- Top = 540
- Width = 12525
- End
- Begin Label Label1
- Caption = "Anchor:"
- Height = 285
- Left = 90
- TabIndex = 2
- Top = 135
- Width = 690
- End
- DefInt A-Z
- Sub dsSocket1_Connect ()
- hPos = InStr(UCase$(txtAnchor), "HTTP://")
- If hPos Then
- szHost$ = Mid$(txtAnchor, hPos + 7)
- szHost$ = Left$(szHost$, InStr(szHost$, "/") - 1)
- szCmd$ = "GET " & Mid$(txtAnchor, InStr(txtAnchor, szHost$) + Len(szHost$)) & Chr$(10)
- txtHTML = ""
- dsSocket1.Send = szCmd$
- End If
- End Sub
- Sub dsSocket1_Receive (ReceiveData As String)
- txtHTML = txtHTML & ReceiveData
- End Sub
- Sub Form_Unload (Cancel As Integer)
- On Error Resume Next
- dsSocket1.Action = DSSOCK_CLOSE
- End Sub
- Sub txtAnchor_KeyPress (KeyAscii As Integer)
- If KeyAscii = 13 Then
- hPos = InStr(UCase$(txtAnchor), "HTTP://")
- If hPos Then
- szHost$ = Mid$(txtAnchor, hPos + 7)
- BS = InStr(szHost$, "/")
- If BS Then
- szHost$ = Left$(szHost$, BS - 1)
- If dsSocket1.Socket Then
- dsSocket1.Action = DSSOCK_CLOSE
- DoEvents
- End If
- dsSocket1.RemotePort = 80
- dsSocket1.RemoteHost = szHost$
- Screen.MousePointer = 11
- On Error Resume Next
- dsSocket1.Action = DSSOCK_CONNECT
- Screen.MousePointer = 0
- If Err Then
- MsgBox Error
- End If
- End If
- End If
- End If
- End Sub
-