home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 6 / mastvb6.iso / ch_code / ch09 / rtfdemo / rtfdemo.frm (.txt) next >
Encoding:
Visual Basic Form  |  1998-04-22  |  4.9 KB  |  161 lines

  1. VERSION 5.00
  2. Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.1#0"; "RICHTX32.OCX"
  3. Begin VB.Form RTFDemo 
  4.    Caption         =   "RTFDemo"
  5.    ClientHeight    =   5205
  6.    ClientLeft      =   60
  7.    ClientTop       =   345
  8.    ClientWidth     =   7395
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   5205
  11.    ScaleWidth      =   7395
  12.    StartUpPosition =   3  'Windows Default
  13.    Begin VB.CommandButton bttnRTF 
  14.       Caption         =   "Show RTF"
  15.       BeginProperty Font 
  16.          Name            =   "Verdana"
  17.          Size            =   9
  18.          Charset         =   0
  19.          Weight          =   400
  20.          Underline       =   0   'False
  21.          Italic          =   0   'False
  22.          Strikethrough   =   0   'False
  23.       EndProperty
  24.       Height          =   375
  25.       Left            =   1920
  26.       TabIndex        =   6
  27.       Top             =   4680
  28.       Width           =   1215
  29.    End
  30.    Begin VB.CommandButton bttnText 
  31.       Caption         =   "Show Text"
  32.       BeginProperty Font 
  33.          Name            =   "Verdana"
  34.          Size            =   9
  35.          Charset         =   0
  36.          Weight          =   400
  37.          Underline       =   0   'False
  38.          Italic          =   0   'False
  39.          Strikethrough   =   0   'False
  40.       EndProperty
  41.       Height          =   375
  42.       Left            =   240
  43.       TabIndex        =   5
  44.       Top             =   4680
  45.       Width           =   1215
  46.    End
  47.    Begin VB.CommandButton bttnClear 
  48.       Caption         =   "Clear"
  49.       BeginProperty Font 
  50.          Name            =   "Verdana"
  51.          Size            =   9
  52.          Charset         =   0
  53.          Weight          =   400
  54.          Underline       =   0   'False
  55.          Italic          =   0   'False
  56.          Strikethrough   =   0   'False
  57.       EndProperty
  58.       Height          =   375
  59.       Left            =   5160
  60.       TabIndex        =   4
  61.       Top             =   4080
  62.       Width           =   1215
  63.    End
  64.    Begin VB.CommandButton BttnRegular 
  65.       Caption         =   "Regular"
  66.       BeginProperty Font 
  67.          Name            =   "Verdana"
  68.          Size            =   9
  69.          Charset         =   0
  70.          Weight          =   400
  71.          Underline       =   0   'False
  72.          Italic          =   0   'False
  73.          Strikethrough   =   0   'False
  74.       EndProperty
  75.       Height          =   375
  76.       Left            =   3520
  77.       TabIndex        =   3
  78.       Top             =   4080
  79.       Width           =   1215
  80.    End
  81.    Begin VB.CommandButton bttnItalic 
  82.       Caption         =   "Italic"
  83.       BeginProperty Font 
  84.          Name            =   "Verdana"
  85.          Size            =   9
  86.          Charset         =   0
  87.          Weight          =   400
  88.          Underline       =   0   'False
  89.          Italic          =   0   'False
  90.          Strikethrough   =   0   'False
  91.       EndProperty
  92.       Height          =   375
  93.       Left            =   1880
  94.       TabIndex        =   2
  95.       Top             =   4080
  96.       Width           =   1215
  97.    End
  98.    Begin VB.CommandButton bttnBold 
  99.       Caption         =   "Bold"
  100.       BeginProperty Font 
  101.          Name            =   "Verdana"
  102.          Size            =   9
  103.          Charset         =   0
  104.          Weight          =   400
  105.          Underline       =   0   'False
  106.          Italic          =   0   'False
  107.          Strikethrough   =   0   'False
  108.       EndProperty
  109.       Height          =   375
  110.       Left            =   240
  111.       TabIndex        =   1
  112.       Top             =   4080
  113.       Width           =   1215
  114.    End
  115.    Begin RichTextLib.RichTextBox RichTextBox1 
  116.       Height          =   3735
  117.       Left            =   120
  118.       TabIndex        =   0
  119.       Top             =   120
  120.       Width           =   7215
  121.       _ExtentX        =   12726
  122.       _ExtentY        =   6588
  123.       _Version        =   393217
  124.       Enabled         =   -1  'True
  125.       TextRTF         =   $"RTFDemo.frx":0000
  126.    End
  127. Attribute VB_Name = "RTFDemo"
  128. Attribute VB_GlobalNameSpace = False
  129. Attribute VB_Creatable = False
  130. Attribute VB_PredeclaredId = True
  131. Attribute VB_Exposed = False
  132. '  ******************************
  133. '  ******************************
  134. '  ** MASTERING VB6            **
  135. '  ** by Evangelos Petroutos   **
  136. '  ** SYBEX, 1998              **
  137. '  ******************************
  138. '  ******************************
  139. Private Sub bttnBold_Click()
  140.     RichTextBox1.SelBold = True
  141. End Sub
  142. Private Sub bttnClear_Click()
  143.     RichTextBox1.Text = ""
  144. End Sub
  145. Private Sub bttnItalic_Click()
  146.     RichTextBox1.SelItalic = True
  147. End Sub
  148. Private Sub BttnRegular_Click()
  149.     RichTextBox1.SelBold = False
  150.     RichTextBox1.SelItalic = False
  151. End Sub
  152. Private Sub bttnRTF_Click()
  153.     MsgBox RichTextBox1.TextRTF
  154. End Sub
  155. Private Sub bttnText_Click()
  156.     MsgBox RichTextBox1.Text
  157. End Sub
  158. Private Sub Form_Load()
  159.     RichTextBox1.LoadFile App.Path & "\RTFText.rtf", rtfRTF
  160. End Sub
  161.