home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / abrows1a / frmedito.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-07-23  |  6.2 KB  |  194 lines

  1. VERSION 5.00
  2. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
  3. Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
  4. Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
  5. Begin VB.Form frmEditor 
  6.    Caption         =   "Andrew's Web Browser : HTML Editor"
  7.    ClientHeight    =   6765
  8.    ClientLeft      =   165
  9.    ClientTop       =   735
  10.    ClientWidth     =   6930
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   6765
  13.    ScaleWidth      =   6930
  14.    StartUpPosition =   3  'Windows Default
  15.    Begin MSComDlg.CommonDialog CommonDialog1 
  16.       Left            =   5280
  17.       Top             =   240
  18.       _ExtentX        =   847
  19.       _ExtentY        =   847
  20.       _Version        =   393216
  21.    End
  22.    Begin RichTextLib.RichTextBox RichTextBox1 
  23.       Height          =   5775
  24.       Left            =   0
  25.       TabIndex        =   5
  26.       Top             =   720
  27.       Width           =   6975
  28.       _ExtentX        =   12303
  29.       _ExtentY        =   10186
  30.       _Version        =   393217
  31.       TextRTF         =   $"frmEditor.frx":0000
  32.    End
  33.    Begin VB.CommandButton Command4 
  34.       Caption         =   "&Open"
  35.       Height          =   375
  36.       Left            =   0
  37.       TabIndex        =   4
  38.       Top             =   240
  39.       Width           =   1215
  40.    End
  41.    Begin VB.CommandButton Command3 
  42.       Caption         =   "&Save"
  43.       Height          =   375
  44.       Left            =   1200
  45.       TabIndex        =   3
  46.       Top             =   240
  47.       Width           =   1215
  48.    End
  49.    Begin VB.CommandButton Command2 
  50.       Caption         =   "&Preview"
  51.       Height          =   375
  52.       Left            =   2400
  53.       TabIndex        =   2
  54.       Top             =   240
  55.       Width           =   1215
  56.    End
  57.    Begin VB.CommandButton Command1 
  58.       Caption         =   "&Close"
  59.       Height          =   375
  60.       Left            =   3600
  61.       TabIndex        =   1
  62.       Top             =   240
  63.       Width           =   1215
  64.    End
  65.    Begin MSComctlLib.StatusBar sbStatusBar 
  66.       Align           =   2  'Align Bottom
  67.       Height          =   270
  68.       Left            =   0
  69.       TabIndex        =   0
  70.       Top             =   6495
  71.       Width           =   6930
  72.       _ExtentX        =   12224
  73.       _ExtentY        =   476
  74.       _Version        =   393216
  75.       BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
  76.          NumPanels       =   3
  77.          BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
  78.             AutoSize        =   1
  79.             Object.Width           =   6588
  80.             Text            =   "Status"
  81.             TextSave        =   "Status"
  82.          EndProperty
  83.          BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
  84.             Style           =   6
  85.             AutoSize        =   2
  86.             TextSave        =   "23/07/99"
  87.          EndProperty
  88.          BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
  89.             Style           =   5
  90.             AutoSize        =   2
  91.             TextSave        =   "18:45"
  92.          EndProperty
  93.       EndProperty
  94.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  95.          Name            =   "Comic Sans MS"
  96.          Size            =   8.25
  97.          Charset         =   0
  98.          Weight          =   400
  99.          Underline       =   0   'False
  100.          Italic          =   0   'False
  101.          Strikethrough   =   0   'False
  102.       EndProperty
  103.    End
  104.    Begin VB.Menu file 
  105.       Caption         =   "&File"
  106.       Begin VB.Menu open 
  107.          Caption         =   "&Open"
  108.       End
  109.       Begin VB.Menu save 
  110.          Caption         =   "&Save"
  111.       End
  112.       Begin VB.Menu menu 
  113.          Caption         =   "-"
  114.       End
  115.       Begin VB.Menu exit 
  116.          Caption         =   "&Exit"
  117.       End
  118.    End
  119.    Begin VB.Menu help 
  120.       Caption         =   "&Help"
  121.       Begin VB.Menu about 
  122.          Caption         =   "&About"
  123.       End
  124.    End
  125. Attribute VB_Name = "frmEditor"
  126. Attribute VB_GlobalNameSpace = False
  127. Attribute VB_Creatable = False
  128. Attribute VB_PredeclaredId = True
  129. Attribute VB_Exposed = False
  130. Private Sub about_Click()
  131.     frmAbout.Show , Me
  132. End Sub
  133. Private Sub Command1_Click()
  134.     Unload Me
  135. End Sub
  136. Private Sub Command2_Click()
  137. Open App.Path & "\preview.html" For Output As #1
  138. Print #1, RichTextBox1.Text
  139. Close #1
  140. Load frmBrowser
  141. frmBrowser.Show
  142. frmBrowser.brwWebBrowser.Navigate App.Path & "\preview.html"
  143. End Sub
  144. Private Sub Command3_Click()
  145. CommonDialog1.Filter = "HTML Files (*.html)|*.html|HTM Files (*.htm)|*.htm)"
  146. CommonDialog1.ShowSave
  147. If CommonDialog1.FileName <> "" Then
  148.     Open CommonDialog1.FileName For Output As #1
  149.     Print #1, RichTextBox1.Text
  150.     Close #1
  151. End If
  152. End Sub
  153. Private Sub Command4_Click()
  154. CommonDialog1.Filter = "HTML Files (*.html)|*.html|HTM Files (*.htm)|*.htm)"
  155. CommonDialog1.ShowOpen
  156. If CommonDialog1.FileName <> "" Then
  157.     Open CommonDialog1.FileName For Input As #1
  158.     Do Until EOF(1)
  159.     Line Input #1, lineoftext$
  160.     alltext$ = alltext$ & lineoftext$
  161.     RichTextBox1.Text = alltext$
  162.     Loop
  163.     Close #1
  164. End If
  165. End Sub
  166. Private Sub exit_Click()
  167.     Unload Me
  168. End Sub
  169. Private Sub Form_Load()
  170. RichTextBox1.Text = "<HTML>" & vbCrLf & vbCrLf & "<HEAD>" & vbCrLf & "<TITLE>" & "Web Page</TITLE>" & vbCrLf & "</HEAD>" & vbCrLf & vbCrLf & "<BODY>" & vbCrLf & vbCrLf & "</BODY>" & vbCrLf & vbCrLf & "</HTML>" & vbCrLf & "<!--This was created using Andrew's Web Browser, and I'm proud of that fact>"
  171. End Sub
  172. Private Sub open_Click()
  173. CommonDialog1.Filter = "HTML Files (*.html)|*.html|HTM Files (*.htm)|*.htm)"
  174. CommonDialog1.ShowOpen
  175. If CommonDialog1.FileName <> "" Then
  176.     Open CommonDialog1.FileName For Input As #1
  177.     Do Until EOF(1)
  178.     Line Input #1, lineoftext$
  179.     alltext$ = alltext$ & lineoftext$
  180.     RichTextBox1.Text = alltext$
  181.     Loop
  182.     Close #1
  183. End If
  184. End Sub
  185. Private Sub save_Click()
  186. CommonDialog1.Filter = "HTML Files (*.html)|*.html|HTM Files (*.htm)|*.htm)"
  187. CommonDialog1.ShowSave
  188. If CommonDialog1.FileName <> "" Then
  189.     Open CommonDialog1.FileName For Output As #1
  190.     Print #1, RichTextBox1.Text
  191.     Close #1
  192. End If
  193. End Sub
  194.