home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 5 / MasteringVisualBasic5.iso / ch_code / ch13 / htmlsrvr / htmlcln2.frm (.txt) next >
Encoding:
Visual Basic Form  |  1997-02-20  |  1.7 KB  |  59 lines

  1. VERSION 5.00
  2. Begin VB.Form frmHTMLClient2 
  3.    Caption         =   "HTML Client"
  4.    ClientHeight    =   3375
  5.    ClientLeft      =   60
  6.    ClientTop       =   345
  7.    ClientWidth     =   4755
  8.    LinkTopic       =   "Form1"
  9.    ScaleHeight     =   3375
  10.    ScaleWidth      =   4755
  11.    StartUpPosition =   3  'Windows Default
  12.    Begin VB.CommandButton cmdDisplay 
  13.       Caption         =   "Display Source Code"
  14.       Height          =   495
  15.       Left            =   3360
  16.       TabIndex        =   2
  17.       Top             =   2760
  18.       Width           =   1215
  19.    End
  20.    Begin VB.CommandButton cmdCreate 
  21.       Caption         =   "Create Source Code"
  22.       Height          =   495
  23.       Left            =   120
  24.       TabIndex        =   1
  25.       Top             =   2760
  26.       Width           =   1215
  27.    End
  28.    Begin VB.TextBox txtHTML 
  29.       Height          =   2655
  30.       Left            =   0
  31.       MultiLine       =   -1  'True
  32.       TabIndex        =   0
  33.       Top             =   0
  34.       Width           =   4695
  35.    End
  36. Attribute VB_Name = "frmHTMLClient2"
  37. Attribute VB_GlobalNameSpace = False
  38. Attribute VB_Creatable = False
  39. Attribute VB_PredeclaredId = True
  40. Attribute VB_Exposed = False
  41. Option Explicit
  42. Dim HTML As Object
  43. Private Sub Form_Unload(Cancel As Integer)
  44.     End
  45. End Sub
  46. Private Sub cmdCreate_Click()
  47.     Set HTML = CreateObject( _
  48.         "HTMLServer.HTMLFile")
  49.     HTML.CreateSourceCode
  50. End Sub
  51. Private Sub cmdDisplay_Click()
  52.     txtHTML.Text = HTML.SourceCode
  53.     Open App.Path + "\VBWeb.htm" For Output As #1
  54.     Print #1, HTML.SourceCode
  55.     Close #1
  56.     WebForm.Show 1
  57.     WebForm.WebBrowser1.Navigate App.Path + "\VBWeb.htm"
  58. End Sub
  59.