home *** CD-ROM | disk | FTP | other *** search
/ Datatid 2000 #2 / Datatid-2000-02.iso / internet / ecpro / setup.exe / HTML2VB.ZIP / CYBRARY / VBApps / html2vb / html2vb.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-04-19  |  3.5 KB  |  113 lines

  1. VERSION 4.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "HTML to VB"
  4.    ClientHeight    =   1884
  5.    ClientLeft      =   3816
  6.    ClientTop       =   2556
  7.    ClientWidth     =   4356
  8.    Height          =   2208
  9.    Left            =   3768
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   1884
  12.    ScaleWidth      =   4356
  13.    Top             =   2280
  14.    Width           =   4452
  15.    Begin VB.CommandButton Command1 
  16.       Caption         =   "Go for it!"
  17.       Height          =   372
  18.       Left            =   1560
  19.       TabIndex        =   0
  20.       Top             =   1200
  21.       Width           =   1092
  22.    End
  23.    Begin VB.Label Label2 
  24.       Alignment       =   2  'Center
  25.       AutoSize        =   -1  'True
  26.       Caption         =   "http://www.relax-cs.com"
  27.       Height          =   192
  28.       Left            =   1332
  29.       TabIndex        =   2
  30.       Top             =   600
  31.       Width           =   1668
  32.    End
  33.    Begin VB.Label Label1 
  34.       Alignment       =   2  'Center
  35.       AutoSize        =   -1  'True
  36.       Caption         =   "Relax Computing Services"
  37.       BeginProperty Font 
  38.          name            =   "Palatia"
  39.          charset         =   0
  40.          weight          =   400
  41.          size            =   16.2
  42.          underline       =   0   'False
  43.          italic          =   0   'False
  44.          strikethrough   =   0   'False
  45.       EndProperty
  46.       Height          =   492
  47.       Left            =   240
  48.       TabIndex        =   1
  49.       Top             =   120
  50.       Width           =   3852
  51.    End
  52.    Begin MSComDlg.CommonDialog CommonDialog2 
  53.       Left            =   3720
  54.       Top             =   1200
  55.       _Version        =   65536
  56.       _ExtentX        =   677
  57.       _ExtentY        =   677
  58.       _StockProps     =   0
  59.    End
  60.    Begin MSComDlg.CommonDialog CommonDialog1 
  61.       Left            =   3000
  62.       Top             =   1200
  63.       _Version        =   65536
  64.       _ExtentX        =   677
  65.       _ExtentY        =   677
  66.       _StockProps     =   0
  67.    End
  68. Attribute VB_Name = "Form1"
  69. Attribute VB_Creatable = False
  70. Attribute VB_Exposed = False
  71. Private Sub Command1_Click()
  72.     Convert
  73. End Sub
  74. Public Sub Convert()
  75.     Dim TextLine As String
  76.     Dim i As Integer
  77.     Dim buf1 As String
  78.     Dim buf2 As String
  79.     'Open Text1.Text For Input As #1 ' Open file.
  80.     'Open Text2.Text For Output As #2
  81.     Open CommonDialog1.filename For Input As #1 ' Open file.
  82.     Open CommonDialog2.filename For Output As #2
  83.     Do While Not EOF(1) ' Loop until end of file.
  84.         Line Input #1, TextLine ' Read line into variable.
  85.         'Debug.Print TextLine    ' Print to Debug window.
  86.         If (Not Trim(TextLine) = "") Then
  87.             buf2 = ""
  88.             For i = 1 To Len(TextLine)
  89.                 buf1 = Mid$(TextLine, i, 1)
  90.                 'Debug.Print buf1
  91.                 If (buf1 = """") Then
  92.                     buf1 = """"""
  93.                     'Debug.Print buf1
  94.                 End If
  95.                 buf2 = buf2 & buf1
  96.                 'Debug.Print buf2
  97.             Next
  98.             Print #2, "Send ("""; buf2; """)"
  99.         End If
  100.     Loop
  101.     Close #1    ' Close file.
  102.     Close #2
  103.     MsgBox "Done!"
  104.     MsgBox "Use right mouse button menu to open converted file"
  105.     CommonDialog2.ShowOpen
  106. End Sub
  107. Private Sub Form_Load()
  108.     MsgBox "Select file to convert"
  109.     CommonDialog1.ShowOpen
  110.     MsgBox "Enter file to save to"
  111.     CommonDialog2.ShowOpen
  112. End Sub
  113.