home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / CODE_UPLOAD1319212302000.psc / frmHTML.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2000-10-02  |  3.3 KB  |  115 lines

  1. VERSION 5.00
  2. Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
  3. Begin VB.Form Form2 
  4.    BorderStyle     =   3  'Fixed Dialog
  5.    Caption         =   "HTML Editor - By VB Dude"
  6.    ClientHeight    =   5985
  7.    ClientLeft      =   45
  8.    ClientTop       =   330
  9.    ClientWidth     =   7230
  10.    Icon            =   "frmHTML.frx":0000
  11.    LinkTopic       =   "Form2"
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   5985
  15.    ScaleWidth      =   7230
  16.    ShowInTaskbar   =   0   'False
  17.    StartUpPosition =   2  'CenterScreen
  18.    Begin MSComDlg.CommonDialog cd 
  19.       Left            =   3360
  20.       Top             =   2760
  21.       _ExtentX        =   847
  22.       _ExtentY        =   847
  23.       _Version        =   393216
  24.    End
  25.    Begin VB.CommandButton Command4 
  26.       Caption         =   "About"
  27.       Height          =   255
  28.       Left            =   4440
  29.       TabIndex        =   5
  30.       Top             =   120
  31.       Width           =   1335
  32.    End
  33.    Begin VB.CommandButton Command3 
  34.       Caption         =   "Preview"
  35.       Height          =   255
  36.       Left            =   3000
  37.       TabIndex        =   4
  38.       Top             =   120
  39.       Width           =   1335
  40.    End
  41.    Begin VB.CommandButton Command2 
  42.       Caption         =   "Open"
  43.       Height          =   255
  44.       Left            =   1560
  45.       TabIndex        =   3
  46.       Top             =   120
  47.       Width           =   1335
  48.    End
  49.    Begin VB.CommandButton Command1 
  50.       Caption         =   "Save"
  51.       Height          =   255
  52.       Left            =   120
  53.       TabIndex        =   2
  54.       Top             =   120
  55.       Width           =   1335
  56.    End
  57.    Begin VB.TextBox Text1 
  58.       Height          =   5055
  59.       Left            =   120
  60.       MultiLine       =   -1  'True
  61.       ScrollBars      =   2  'Vertical
  62.       TabIndex        =   1
  63.       Text            =   "frmHTML.frx":0442
  64.       Top             =   720
  65.       Width           =   6975
  66.    End
  67.    Begin VB.Label Label1 
  68.       Caption         =   "HTML:"
  69.       Height          =   255
  70.       Left            =   120
  71.       TabIndex        =   0
  72.       Top             =   480
  73.       Width           =   2175
  74.    End
  75. Attribute VB_Name = "Form2"
  76. Attribute VB_GlobalNameSpace = False
  77. Attribute VB_Creatable = False
  78. Attribute VB_PredeclaredId = True
  79. Attribute VB_Exposed = False
  80. Private Sub Command1_Click()
  81. cd.Filter = "Webpage Files|*.html;*.htm;"
  82. cd.DialogTitle = "Save File"
  83. cd.ShowSave
  84. If cd.FileName <> "" Then
  85. Open cd.FileName For Output As #1
  86.     Print #1, Text1.Text
  87.     Close #1
  88. End If
  89. End Sub
  90. Private Sub Command2_Click()
  91. Text1.SetFocus
  92. cd.Filter = "Webpage Files|*.html;*.htm;"
  93. cd.ShowOpen
  94. If cd.FileName <> "" Then
  95.     Open cd.FileName For Input As #1
  96.     Do Until EOF(1)
  97.     Line Input #1, lineoftext$
  98.     alltext$ = alltext$ & lineoftext$
  99.     Text1.Text = alltext$
  100.     Loop
  101.     Close #1
  102. End If
  103. End Sub
  104. Private Sub Command3_Click()
  105. Open App.Path & "\preview.htm" For Output As #1
  106. Print #1, Text1.Text
  107. Close #1
  108. frmBrowser.brwWebBrowser.Navigate App.Path & "\preview.html"
  109. frmBrowser.cboAddress.Text = frmBrowser.brwWebBrowser.LocationURL
  110. frmBrowser.Show vbModal, Me
  111. End Sub
  112. Private Sub Command4_Click()
  113. Form1.Show vbModal, Me
  114. End Sub
  115.