home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form Form1
- Caption = "HTML to VB"
- ClientHeight = 1884
- ClientLeft = 3816
- ClientTop = 2556
- ClientWidth = 4356
- Height = 2208
- Left = 3768
- LinkTopic = "Form1"
- ScaleHeight = 1884
- ScaleWidth = 4356
- Top = 2280
- Width = 4452
- Begin VB.CommandButton Command1
- Caption = "Go for it!"
- Height = 372
- Left = 1560
- TabIndex = 0
- Top = 1200
- Width = 1092
- End
- Begin VB.Label Label2
- Alignment = 2 'Center
- AutoSize = -1 'True
- Caption = "http://www.relax-cs.com"
- Height = 192
- Left = 1332
- TabIndex = 2
- Top = 600
- Width = 1668
- End
- Begin VB.Label Label1
- Alignment = 2 'Center
- AutoSize = -1 'True
- Caption = "Relax Computing Services"
- BeginProperty Font
- name = "Palatia"
- charset = 0
- weight = 400
- size = 16.2
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 492
- Left = 240
- TabIndex = 1
- Top = 120
- Width = 3852
- End
- Begin MSComDlg.CommonDialog CommonDialog2
- Left = 3720
- Top = 1200
- _Version = 65536
- _ExtentX = 677
- _ExtentY = 677
- _StockProps = 0
- End
- Begin MSComDlg.CommonDialog CommonDialog1
- Left = 3000
- Top = 1200
- _Version = 65536
- _ExtentX = 677
- _ExtentY = 677
- _StockProps = 0
- End
- Attribute VB_Name = "Form1"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Private Sub Command1_Click()
- Convert
- End Sub
- Public Sub Convert()
- Dim TextLine As String
- Dim i As Integer
- Dim buf1 As String
- Dim buf2 As String
- 'Open Text1.Text For Input As #1 ' Open file.
- 'Open Text2.Text For Output As #2
- Open CommonDialog1.filename For Input As #1 ' Open file.
- Open CommonDialog2.filename For Output As #2
- Do While Not EOF(1) ' Loop until end of file.
- Line Input #1, TextLine ' Read line into variable.
- 'Debug.Print TextLine ' Print to Debug window.
- If (Not Trim(TextLine) = "") Then
- buf2 = ""
- For i = 1 To Len(TextLine)
- buf1 = Mid$(TextLine, i, 1)
- 'Debug.Print buf1
- If (buf1 = """") Then
- buf1 = """"""
- 'Debug.Print buf1
- End If
- buf2 = buf2 & buf1
- 'Debug.Print buf2
- Next
- Print #2, "Send ("""; buf2; """)"
- End If
- Loop
- Close #1 ' Close file.
- Close #2
- MsgBox "Done!"
- MsgBox "Use right mouse button menu to open converted file"
- CommonDialog2.ShowOpen
- End Sub
- Private Sub Form_Load()
- MsgBox "Select file to convert"
- CommonDialog1.ShowOpen
- MsgBox "Enter file to save to"
- CommonDialog2.ShowOpen
- End Sub
-