MainScr.frm

 VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form MainScr
   Caption         =   "Untitled - XenonPad"
   ClientHeight    =   8460
   ClientLeft      =   165
   ClientTop       =   855
   ClientWidth     =   10170
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   ScaleHeight     =   8460
   ScaleWidth      =   10170
   StartUpPosition =   3  'Windows Default
   WindowState     =   2  'Maximized
   Begin MSComDlg.CommonDialog CmDlg
      Left            =   120
      Top             =   7320
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
   Begin MSComctlLib.StatusBar StatusBar
      Align           =   2  'Align Bottom
      Height          =   330
      Left            =   0
      TabIndex        =   16
      Top             =   8130
      Width           =   10170
      _ExtentX        =   17939
      _ExtentY        =   582
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
         NumPanels       =   2
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
            AutoSize        =   1
            Object.Width           =   13070
            Text            =   "Ready"
            TextSave        =   "Ready"
         EndProperty
         BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628}
            Object.Width           =   4304
            MinWidth        =   4304
            Text            =   "Untitled"
            TextSave        =   "Untitled"
            Object.ToolTipText     =   "Document Name"
         EndProperty
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin RichTextLib.RichTextBox rtfText
      Height          =   6375
      Left            =   0
      TabIndex        =   0
      Top             =   1245
      Width           =   9735
      _ExtentX        =   17171
      _ExtentY        =   11245
      _Version        =   393217
      BorderStyle     =   0
      ScrollBars      =   2
      DisableNoScroll =   -1  'True
      AutoVerbMenu    =   -1  'True
      TextRTF         =   $"MainScr.frx":0000
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
         Name            =   "Trebuchet MS"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin MSComctlLib.ImageList FindBarButtons
      Left            =   3720
      Top             =   6840
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   16
      ImageHeight     =   16
      MaskColor       =   16777215
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
         NumListImages   =   3
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
            Picture         =   "MainScr.frx":0081
            Key             =   "Find"
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
            Picture         =   "MainScr.frx":03D3
            Key             =   "Replace"
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
            Picture         =   "MainScr.frx":0725
            Key             =   "Select"
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.ImageList LeftBarIcons
      Left            =   3120
      Top             =   6840
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   16
      ImageHeight     =   16
      MaskColor       =   16777215
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
         NumListImages   =   6
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
            Picture         =   "MainScr.frx":0A77
            Key             =   "Left"
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
            Picture         =   "MainScr.frx":0DC9
            Key             =   "Center"
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
            Picture         =   "MainScr.frx":111B
            Key             =   "Right"
         EndProperty
         BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
            Picture         =   "MainScr.frx":146D
            Key             =   "Bullets"
         EndProperty
         BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
            Picture         =   "MainScr.frx":17BF
            Key             =   "Background"
         EndProperty
         BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
            Picture         =   "MainScr.frx":1B11
            Key             =   "Spacing"
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.ImageList BoldBarIcons
      Left            =   2520
      Top             =   6840
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   16
      ImageHeight     =   16
      MaskColor       =   16777215
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
         NumListImages   =   10
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
            Picture         =   "MainScr.frx":1E63
            Key             =   "Bold"
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
            Picture         =   "MainScr.frx":21B5
            Key             =   "Italic"
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
            Picture         =   "MainScr.frx":2507
            Key             =   "Underline"
         EndProperty
         BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
            Picture         =   "MainScr.frx":2859
            Key             =   "Strike Thru"
         EndProperty
         BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
            Picture         =   "MainScr.frx":2BAB
            Key             =   "Subscript"
         EndProperty
         BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
            Picture         =   "MainScr.frx":2EFD
            Key             =   "Superscript"
         EndProperty
         BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
            Picture         =   "MainScr.frx":324F
            Key             =   "Shrink"
         EndProperty
         BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
            Picture         =   "MainScr.frx":35A1
            Key             =   "Grow"
         EndProperty
         BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
            Picture         =   "MainScr.frx":38F3
            Key             =   "Change Case"
         EndProperty
         BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
            Picture         =   "MainScr.frx":3C45
            Key             =   "Color"
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.ImageList CutBarIcons
      Left            =   1920
      Top             =   6840
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   16
      ImageHeight     =   16
      MaskColor       =   16777215
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
         NumListImages   =   3
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
            Picture         =   "MainScr.frx":3F97
            Key             =   "Cut"
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
            Picture         =   "MainScr.frx":42E9
            Key             =   "Copy"
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
            Picture         =   "MainScr.frx":463B
            Key             =   "Format"
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.ImageList PasteBarIcons
      Left            =   1320
      Top             =   6840
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   28
      ImageHeight     =   32
      MaskColor       =   16777215
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
         NumListImages   =   1
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
            Picture         =   "MainScr.frx":498D
            Key             =   "Paste"
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.ImageList OpenBarIcons
      Left            =   720
      Top             =   6840
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   16
      ImageHeight     =   16
      MaskColor       =   16777215
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
         NumListImages   =   4
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
            Picture         =   "MainScr.frx":545F
            Key             =   "Open"
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
            Picture         =   "MainScr.frx":57B1
            Key             =   "Save"
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
            Picture         =   "MainScr.frx":5B03
            Key             =   "Save As"
         EndProperty
         BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
            Picture         =   "MainScr.frx":5E55
            Key             =   "Print"
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.ImageList NewBarIcons
      Left            =   120
      Top             =   6840
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   24
      ImageHeight     =   31
      MaskColor       =   16777215
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
         NumListImages   =   1
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
            Picture         =   "MainScr.frx":61A7
            Key             =   "New"
         EndProperty
      EndProperty
   End
   Begin VB.PictureBox RibbonBar
      Align           =   1  'Align Top
      BorderStyle     =   0  'None
      Height          =   1215
      Left            =   0
      ScaleHeight     =   1215
      ScaleWidth      =   10170
      TabIndex        =   1
      TabStop         =   0   'False
      Top             =   0
      Width           =   10170
      Begin MSComctlLib.Toolbar StandardBar
         Height          =   1095
         Left            =   60
         TabIndex        =   2
         Top             =   120
         Width           =   1575
         _ExtentX        =   2778
         _ExtentY        =   1931
         ButtonWidth     =   609
         ButtonHeight    =   1826
         AllowCustomize  =   0   'False
         Appearance      =   1
         _Version        =   393216
         Begin MSComctlLib.Toolbar OpenBar
            Height          =   660
            Left            =   720
            TabIndex        =   4
            Top             =   165
            Width           =   735
            _ExtentX        =   1296
            _ExtentY        =   1164
            ButtonWidth     =   609
            ButtonHeight    =   582
            AllowCustomize  =   0   'False
            Style           =   1
            ImageList       =   "OpenBarIcons"
            _Version        =   393216
            BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
               NumButtons      =   4
               BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
                  Key             =   "Open"
                  Object.ToolTipText     =   "Open (Ctrl+O)"
                  ImageKey        =   "Open"
               EndProperty
               BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
                  Key             =   "Print"
                  Object.ToolTipText     =   "Print (Ctrl+P)"
                  ImageKey        =   "Print"
               EndProperty
               BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
                  Key             =   "Save"
                  Object.ToolTipText     =   "Save (Ctrl+S)"
                  ImageKey        =   "Save"
               EndProperty
               BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
                  Key             =   "Save As"
                  Object.ToolTipText     =   "Save As (F12)"
                  ImageKey        =   "Save As"
               EndProperty
            EndProperty
         End
         Begin MSComctlLib.Toolbar NewBar
            Height          =   765
            Left            =   120
            TabIndex        =   3
            Top             =   120
            Width           =   735
            _ExtentX        =   1296
            _ExtentY        =   1349
            ButtonWidth     =   820
            ButtonHeight    =   1349
            AllowCustomize  =   0   'False
            Style           =   1
            ImageList       =   "NewBarIcons"
            _Version        =   393216
            BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
               NumButtons      =   2
               BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
                  Caption         =   "New"
                  Object.ToolTipText     =   "New (Ctrl+N)"
                  ImageKey        =   "New"
               EndProperty
               BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
                  Style           =   3
               EndProperty
            EndProperty
         End
      End
      Begin MSComctlLib.Toolbar EditBar
         Height          =   1095
         Left            =   1680
         TabIndex        =   5
         Top             =   120
         Width           =   1290
         _ExtentX        =   2275
         _ExtentY        =   1931
         ButtonWidth     =   609
         ButtonHeight    =   1826
         AllowCustomize  =   0   'False
         Appearance      =   1
         _Version        =   393216
         Begin MSComctlLib.Toolbar CutBar
            Height          =   990
            Left            =   795
            TabIndex        =   6
            Top             =   30
            Width           =   495
            _ExtentX        =   873
            _ExtentY        =   1746
            ButtonWidth     =   609
            ButtonHeight    =   582
            AllowCustomize  =   0   'False
            Style           =   1
            ImageList       =   "CutBarIcons"
            _Version        =   393216
            BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
               NumButtons      =   3
               BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
                  Key             =   "Cut"
                  Object.ToolTipText     =   "Cut (Ctrl+X)"
                  ImageKey        =   "Cut"
               EndProperty
               BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
                  Key             =   "Copy"
                  Object.ToolTipText     =   "Copy (Ctrl+C)"
                  ImageKey        =   "Copy"
               EndProperty
               BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
                  Key             =   "Format"
                  Object.ToolTipText     =   "Format Painter"
                  ImageKey        =   "Format"
               EndProperty
            EndProperty
         End
         Begin MSComctlLib.Toolbar PasteBar
            Height          =   780
            Left            =   120
            TabIndex        =   7
            Top             =   120
            Width           =   735
            _ExtentX        =   1296
            _ExtentY        =   1376
            ButtonWidth     =   926
            ButtonHeight    =   1376
            AllowCustomize  =   0   'False
            Style           =   1
            ImageList       =   "PasteBarIcons"
            _Version        =   393216
            BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
               NumButtons      =   2
               BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
                  Caption         =   "Paste"
                  Object.ToolTipText     =   "Paste (Ctrl+V)"
                  ImageKey        =   "Paste"
               EndProperty
               BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
                  Style           =   3
               EndProperty
            EndProperty
         End
      End
      Begin MSComctlLib.Toolbar FormatBar
         Height          =   1095
         Left            =   3015
         TabIndex        =   8
         Top             =   120
         Width           =   4440
         _ExtentX        =   7832
         _ExtentY        =   1931
         ButtonWidth     =   609
         ButtonHeight    =   1826
         AllowCustomize  =   0   'False
         Appearance      =   1
         _Version        =   393216
         Begin VB.ComboBox cboSize
            BeginProperty Font
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   315
            Left            =   3240
            TabIndex        =   11
            Text            =   "12"
            ToolTipText     =   "Font Size"
            Top             =   180
            Width           =   985
         End
         Begin VB.ComboBox cboFont
            BeginProperty Font
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   315
            Left            =   120
            Sorted          =   -1  'True
            TabIndex        =   10
            Text            =   "Trebuchet MS"
            ToolTipText     =   "Font"
            Top             =   180
            Width           =   3015
         End
         Begin MSComctlLib.Toolbar BoldBar
            Height          =   330
            Left            =   120
            TabIndex        =   9
            Top             =   555
            Width           =   4215
            _ExtentX        =   7435
            _ExtentY        =   582
            ButtonWidth     =   609
            ButtonHeight    =   582
            AllowCustomize  =   0   'False
            Style           =   1
            ImageList       =   "BoldBarIcons"
            _Version        =   393216
            BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
               NumButtons      =   14
               BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
                  Key             =   "Bold"
                  Object.ToolTipText     =   "Bold (Ctrl+B)"
                  ImageKey        =   "Bold"
               EndProperty
               BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
                  Key             =   "Italic"
                  Object.ToolTipText     =   "Italic (Ctrl+I)"
                  ImageKey        =   "Italic"
               EndProperty
               BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
                  Key             =   "Underline"
                  Object.ToolTipText     =   "Underline (Ctrl+U)"
                  ImageKey        =   "Underline"
               EndProperty
               BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
                  Key             =   "Strike Thru"
                  Object.ToolTipText     =   "Strikethrough"
                  ImageKey        =   "Strike Thru"
               EndProperty
               BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}
                  Style           =   3
               EndProperty
               BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}
                  Key             =   "Grow"
                  Object.ToolTipText     =   "Grow Font"
                  ImageKey        =   "Grow"
               EndProperty
               BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628}
                  Key             =   "Shrink"
                  Object.ToolTipText     =   "Shrink Font"
                  ImageKey        =   "Shrink"
               EndProperty
               BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628}
                  Style           =   3
               EndProperty
               BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628}
                  Key             =   "Subscript"
                  Object.ToolTipText     =   "Subscript"
                  ImageKey        =   "Subscript"
               EndProperty
               BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628}
                  Key             =   "Superscript"
                  Object.ToolTipText     =   "Superscript"
                  ImageKey        =   "Superscript"
               EndProperty
               BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628}
                  Style           =   3
               EndProperty
               BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628}
                  Key             =   "Case"
                  Object.ToolTipText     =   "Change Sentence Case"
                  ImageKey        =   "Change Case"
                  Style           =   5
                  BeginProperty ButtonMenus {66833FEC-8583-11D1-B16A-00C0F0283628}
                     NumButtonMenus  =   5
                     BeginProperty ButtonMenu1 {66833FEE-8583-11D1-B16A-00C0F0283628}
                        Text            =   "&Sentence case."
                     EndProperty
                     BeginProperty ButtonMenu2 {66833FEE-8583-11D1-B16A-00C0F0283628}
                        Text            =   "&lowercase"
                     EndProperty
                     BeginProperty ButtonMenu3 {66833FEE-8583-11D1-B16A-00C0F0283628}
                        Text            =   "&UPPERCASE"
                     EndProperty
                     BeginProperty ButtonMenu4 {66833FEE-8583-11D1-B16A-00C0F0283628}
                        Text            =   "&Capitalize Each Word"
                     EndProperty
                     BeginProperty ButtonMenu5 {66833FEE-8583-11D1-B16A-00C0F0283628}
                        Text            =   "&tOGGLE cASE"
                     EndProperty
                  EndProperty
               EndProperty
               BeginProperty Button13 {66833FEA-8583-11D1-B16A-00C0F0283628}
                  Style           =   3
               EndProperty
               BeginProperty Button14 {66833FEA-8583-11D1-B16A-00C0F0283628}
                  Key             =   "Color"
                  Object.ToolTipText     =   "Font Color"
                  ImageKey        =   "Color"
               EndProperty
            EndProperty
         End
      End
      Begin MSComctlLib.Toolbar Toolbar1
         Height          =   1095
         Left            =   7500
         TabIndex        =   12
         Top             =   120
         Width           =   1290
         _ExtentX        =   2275
         _ExtentY        =   1931
         ButtonWidth     =   609
         ButtonHeight    =   1826
         AllowCustomize  =   0   'False
         Appearance      =   1
         _Version        =   393216
         Begin MSComctlLib.Toolbar LeftBar
            Height          =   660
            Left            =   120
            TabIndex        =   13
            Top             =   165
            Width           =   1095
            _ExtentX        =   1931
            _ExtentY        =   1164
            ButtonWidth     =   609
            ButtonHeight    =   582
            AllowCustomize  =   0   'False
            Style           =   1
            ImageList       =   "LeftBarIcons"
            _Version        =   393216
            BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
               NumButtons      =   6
               BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
                  Key             =   "Bullets"
                  Object.ToolTipText     =   "Bullets"
                  ImageKey        =   "Bullets"
               EndProperty
               BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
                  Key             =   "Spacing"
                  Object.ToolTipText     =   "Line Spacing"
                  ImageKey        =   "Spacing"
               EndProperty
               BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
                  Key             =   "Background"
                  Object.ToolTipText     =   "Page Background Color"
                  ImageKey        =   "Background"
               EndProperty
               BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
                  Key             =   "Left"
                  Object.ToolTipText     =   "Align Left (Ctrl+L)"
                  ImageKey        =   "Left"
                  Style           =   2
                  Value           =   1
               EndProperty
               BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}
                  Key             =   "Center"
                  Object.ToolTipText     =   "Center (Ctrl+E)"
                  ImageKey        =   "Center"
                  Style           =   2
               EndProperty
               BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}
                  Key             =   "Right"
                  Object.ToolTipText     =   "Align Right (Ctrl+R)"
                  ImageKey        =   "Right"
                  Style           =   2
               EndProperty
            EndProperty
         End
      End
      Begin MSComctlLib.Toolbar Toolbar3
         Height          =   1095
         Left            =   8840
         TabIndex        =   14
         Top             =   120
         Width           =   1290
         _ExtentX        =   2275
         _ExtentY        =   1931
         ButtonWidth     =   609
         ButtonHeight    =   1826
         AllowCustomize  =   0   'False
         Appearance      =   1
         _Version        =   393216
         Begin MSComctlLib.Toolbar FindScr
            Height          =   990
            Left            =   120
            TabIndex        =   15
            Top             =   30
            Width           =   1095
            _ExtentX        =   1931
            _ExtentY        =   1746
            ButtonWidth     =   1799
            ButtonHeight    =   582
            AllowCustomize  =   0   'False
            Style           =   1
            TextAlignment   =   1
            ImageList       =   "FindBarButtons"
            _Version        =   393216
            BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
               NumButtons      =   3
               BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
                  Caption         =   "Find"
                  Key             =   "Find"
                  Object.ToolTipText     =   "Find (Ctrl+F)"
                  ImageKey        =   "Find"
               EndProperty
               BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
                  Caption         =   " Replace"
                  Key             =   "Replace"
                  Object.ToolTipText     =   "Replace (Ctrl+H)"
                  ImageKey        =   "Replace"
               EndProperty
               BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
                  Caption         =   "Select"
                  Key             =   "Select"
                  Object.ToolTipText     =   "Select All (Ctrl+A)"
                  ImageKey        =   "Select"
               EndProperty
            EndProperty
         End
      End
   End
   Begin VB.Menu FileMenu
      Caption         =   "&File"
      Begin VB.Menu FileNew
         Caption         =   "&New"
         Shortcut        =   ^N
      End
      Begin VB.Menu FileOpen
         Caption         =   "&Open..."
         Shortcut        =   ^O
      End
      Begin VB.Menu FileSave
         Caption         =   "&Save"
         Shortcut        =   ^S
      End
      Begin VB.Menu FileSaveAs
         Caption         =   "Save &As..."
         Shortcut        =   {F12}
      End
      Begin VB.Menu FileSep1
         Caption         =   "-"
      End
      Begin VB.Menu FilePrint
         Caption         =   "&Print..."
         Shortcut        =   ^P
      End
      Begin VB.Menu FileSep2
         Caption         =   "-"
      End
      Begin VB.Menu EditExit
         Caption         =   "E&xit"
         Shortcut        =   ^Q
      End
   End
   Begin VB.Menu EditMenu
      Caption         =   "&Edit"
      Begin VB.Menu EditUndo
         Caption         =   "&Undo"
         Shortcut        =   ^Z
      End
      Begin VB.Menu EditSep1
         Caption         =   "-"
      End
      Begin VB.Menu EditCut
         Caption         =   "Cu&t"
         Shortcut        =   ^X
      End
      Begin VB.Menu EditCopy
         Caption         =   "&Copy"
         Shortcut        =   ^C
      End
      Begin VB.Menu EditPaste
         Caption         =   "&Paste"
         Shortcut        =   ^V
      End
      Begin VB.Menu EditDelete
         Caption         =   "&Delete"
         Shortcut        =   {DEL}
      End
      Begin VB.Menu EditSep2
         Caption         =   "-"
      End
      Begin VB.Menu EditSelAll
         Caption         =   "&Select All..."
         Shortcut        =   ^A
      End
      Begin VB.Menu EditSep3
         Caption         =   "-"
      End
      Begin VB.Menu EditFind
         Caption         =   "&Find..."
         Shortcut        =   ^F
      End
      Begin VB.Menu EditFindNext
         Caption         =   "Find Ne&xt"
         Enabled         =   0   'False
         Shortcut        =   {F3}
      End
      Begin VB.Menu EditReplace
         Caption         =   "&Replace..."
         Shortcut        =   ^H
      End
   End
   Begin VB.Menu ViewMenu
      Caption         =   "&View"
      Begin VB.Menu ViewRibbonBar
         Caption         =   "&Ribbon Bar"
         Checked         =   -1  'True
      End
      Begin VB.Menu ViewStatusBar
         Caption         =   "&Status Bar"
         Checked         =   -1  'True
      End
   End
   Begin VB.Menu FormatMenu
      Caption         =   "F&ormat"
      Begin VB.Menu FormatFont
         Caption         =   "&Font"
         Shortcut        =   ^D
      End
      Begin VB.Menu FormatSep1
         Caption         =   "-"
      End
      Begin VB.Menu FormatAlignment
         Caption         =   "Ali&gnment"
         Begin VB.Menu FormatAlignLeft
            Caption         =   "&Left"
            Checked         =   -1  'True
            Shortcut        =   ^L
         End
         Begin VB.Menu FormatAlignCenter
            Caption         =   "&Center"
            Checked         =   -1  'True
            Shortcut        =   ^E
         End
         Begin VB.Menu FormatAlignRight
            Caption         =   "&Right"
            Checked         =   -1  'True
            Shortcut        =   ^R
         End
      End
      Begin VB.Menu FormatAttr
         Caption         =   "&Attributes"
         Begin VB.Menu FormatAttrBold
            Caption         =   "&Bold"
            Checked         =   -1  'True
            Shortcut        =   ^B
         End
         Begin VB.Menu FormatAttrItalic
            Caption         =   "&Italic"
            Checked         =   -1  'True
            Shortcut        =   ^I
         End
         Begin VB.Menu FormatAttrUnderline
            Caption         =   "&Underline"
            Checked         =   -1  'True
            Shortcut        =   ^U
         End
         Begin VB.Menu FormatAttrStrike
            Caption         =   "&Strikethrough"
            Checked         =   -1  'True
         End
      End
   End
   Begin VB.Menu HelpMenu
      Caption         =   "&Help"
      Begin VB.Menu HelpAbout
         Caption         =   "&About XenonPad..."
      End
   End
End
Attribute VB_Name = "MainScr"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public DocumentChange As Boolean
' Stores a value indicating whether the current document has been changed
' or not
Public DocumentName As String
' Stores the name of the current document

Private Sub BoldBar_ButtonClick(ByVal Button As MSComctlLib.Button)
    On Error Resume Next
    Dim TempOffset As Integer
    ' Stores the value of Offset before assigning the new value to SelCharOffset
    Select Case Button.Key
        Case "Bold"     ' User pressed Bold button
            rtfText.SelBold = Not rtfText.SelBold   ' Changes the current bold property of the selected text
            Button.Value = IIf(rtfText.SelBold, tbrPressed, tbrUnpressed)
            ' Assigns new state to the button
        Case "Italic"   ' User pressed Italic button
            rtfText.SelItalic = Not rtfText.SelItalic   ' Changes the current italic property of selected text
            Button.Value = IIf(rtfText.SelItalic, tbrPressed, tbrUnpressed)
            ' Assigns new state to the button
        Case "Underline"    ' User pressed Underline button
            rtfText.SelUnderline = Not rtfText.SelUnderline ' Changes the current underline property of selected text
            Button.Value = IIf(rtfText.SelUnderline, tbrPressed, tbrUnpressed)
            ' Assigns new state to the button
        Case "Strike Thru"  ' User pressed Strikethrough button
            rtfText.SelStrikeThru = Not rtfText.SelStrikeThru ' Changes the current Strikeout property of selected text
            Button.Value = IIf(rtfText.SelStrikeThru, tbrPressed, tbrUnpressed)
            ' Assigns new state to the button
        Case "Grow" ' User pressed Grow Font button
            If Not rtfText.SelFontSize = 72 Then rtfText.SelFontSize = rtfText.SelFontSize + 1
            cboSize.Text = rtfText.SelFontSize
            ' Increases the selection size up to 72 step by step (with increment of 1)
        Case "Shrink" ' User pressed Shrink Font button
            If Not rtfText.SelFontSize = 8 Then rtfText.SelFontSize = rtfText.SelFontSize - 1
            cboSize.Text = rtfText.SelFontSize
            ' Decreases the selection size up to 8 step by step (with increment of 1)
        Case "Subscript" ' User pressed the Subscript button
            TempOffset = rtfText.SelCharOffset
            ' Stores the value of CharOffset of currently selected text
            If TempOffset = 0 Then
            ' If stored value is 0, then decrease the text level
                rtfText.SelCharOffset = -55
                Button.Value = tbrPressed
            Else
            ' Otherwise make the text level to normal
                rtfText.SelCharOffset = 0
                Button.Value = tbrUnpressed
            End If
        Case "Superscript" ' User pressed the Superscript button
            TempOffset = rtfText.SelCharOffset
            ' Stores the value of CharOffset of currently selected text
            If TempOffset = 0 Then
            ' If stored value is 0, then increase the text level
                rtfText.SelCharOffset = 55
                Button.Value = tbrPressed
            Else
            ' Otherwise make the text level to normal
                rtfText.SelCharOffset = 0
                Button.Value = tbrUnpressed
            End If
        Case "Case" ' User pressed Change case button
            rtfText.SelText = SpecialCase(rtfText.SelText, SentenceCase)
            ' Call a function, (not built-in) to change the case
        Case "Color" ' User pressed the Font Color button
            With CmDlg  ' Using the CmDlg (CommonDialog Control)
                .ShowColor  ' Show its Color Selection dialog
                    If Not IsNull(.Color) Then rtfText.SelColor = .Color
                    ' If a valid color is selected then make it the forecolor of
                    ' selected text
            End With
    End Select
End Sub

Private Sub BoldBar_ButtonMenuClick(ByVal ButtonMenu As MSComctlLib.ButtonMenu)
    Select Case ButtonMenu.Index
        Case 1 ' Sentence case
            rtfText.SelText = SpecialCase(rtfText.SelText, SentenceCase)
            ' Call a function, (not built-in) to change the case
        Case 2 ' lowercase
            rtfText.SelText = StrConv(rtfText.SelText, vbLowerCase)
            ' Set the text case to lower
        Case 3 ' UPPERCASE
            rtfText.SelText = StrConv(rtfText.SelText, vbUpperCase)
            ' Set the text case to upper
        Case 4 ' Capitalize Each Word
            rtfText.SelText = StrConv(rtfText.SelText, vbProperCase)
            ' Make every first letter of all the words in the selected text
            ' to capital (ProperCase)
        Case 5 ' tOGGLE cASE
            rtfText.SelText = SpecialCase(rtfText.SelText, ToggleCase)
            ' Call a function, (not built-in) to change the case
    End Select
    rtfText.SetFocus
    ' Return the focus back to the text writing area
End Sub

Private Sub cboFont_Click()
    ' User changes or simply clicks the combobox containing the list of fonts
    rtfText.SelFontName = cboFont.Text
    ' Select the font for the selected text from the combobox
    rtfText.SetFocus
    ' Returns the focus
End Sub

Private Sub cboSize_Click()
    ' User changes or simply clicks the combobox containing the list of font sizes
    rtfText.SelFontSize = Val(cboSize.Text)
    ' Select the font size for the selected text from the combobox
    ' Val(input) returns only the numerical value
    rtfText.SetFocus
    ' Returns the focus
End Sub

Private Sub CutBar_ButtonClick(ByVal Button As MSComctlLib.Button)
    Select Case Button.Key
        Case "Cut" ' User pressed the Cut button
            SendMessage rtfText.hwnd, WM_CUT, 0&, 0&
            ' Using the Windows API send (copy and then remove) the selected text to Clipboard
            ' Also be USED:
            ' Clipboard.SetText rtfText.SelText, vbCFText
            ' rtfText.SelText = ""
        Case "Copy" ' User pressed the Copy button
            SendMessage rtfText.hwnd, WM_COPY, 0&, 0&
            ' Using the Windows API copy the selected text to Clipboard
        Case "Format" ' User pressed the Format Painter button
            MsgBox "This tool isn't available. Sorry!", vbInformation, "XenonPad"
            ' I haven't added this tool yet
    End Select
End Sub

Private Sub EditCopy_Click()
    SendMessage rtfText.hwnd, WM_COPY, 0&, 0&
    ' Using the Windows API copy the selected text to Clipboard
End Sub

Private Sub EditCut_Click()
    SendMessage rtfText.hwnd, WM_CUT, 0&, 0&
    ' Using the Windows API send the selected text to Clipboard
End Sub

Private Sub EditDelete_Click()
    SendMessage rtfText.hwnd, WM_CLEAR, 0&, 0&
    ' Using the Windows API clear or delete the selected text
End Sub

Private Sub EditExit_Click()
    ExitProgram
    ' Exit the program
End Sub

Private Sub EditFind_Click()
    FindReplaceScr.Tabs.Tab = 0
    FindReplaceScr.Show , Me
    FindReplaceScr.Search(0).SetFocus
End Sub

Private Sub EditFindNext_Click()
    Dim lngResult As Integer
    Dim lngPos As Integer
    Dim intOptions As Integer
    ' Set search options
    If FindReplaceScr.WholeWord(0).Value = 1 Or FindReplaceScr.WholeWord(1).Value = 1 Then intOptions = intOptions + 2
    If FindReplaceScr.MatchCase(0).Value = 1 Or FindReplaceScr.MatchCase(1).Value = 1 Then intOptions = intOptions + 4

    lngPos = rtfText.SelStart + rtfText.SelLength
    ' Get position of the searched word
    lngResult = rtfText.Find(FindReplaceScr.Search(0).Text, lngPos, , intOptions)
    If lngResult = -1 Then 'Text not found
        With FindReplaceScr
            MsgBox "XenonPad has finished searching the document.", vbInformation, "XenonPad"
            .FindButt.Caption = "&Find" 'Set caption
            .ReplaceButt.Enabled = False 'Disable Replace button
            .ReplaceAllButt.Enabled = False 'Disable ReplaceAll button
            EditFindNext.Enabled = False 'Disable Find Next menu
        End With
    Else
        rtfText.SetFocus 'Set focus
    End If
End Sub

Private Sub EditPaste_Click()
    PasteFromClipboard
    ' Get the clipboard stored data and then paste or insert it in to
    ' the text writing area
    ' It may be picture, text or RTF text
End Sub

Private Sub EditReplace_Click()
    FindReplaceScr.Tabs.Tab = 1
    FindReplaceScr.Show , Me
    FindReplaceScr.Search(1).SetFocus
End Sub

Private Sub EditSelAll_Click()
    rtfText.SelStart = 0
    ' Start selecting the text from the begining
    rtfText.SelLength = Len(rtfText.Text)
    ' Upto the end
End Sub

Private Sub EditUndo_Click()
    SendMessage rtfText.hwnd, EM_UNDO, 0&, 0&
    ' Using the Windows API undo the last user action
End Sub

Private Sub FileNew_Click()
    NewDocument
    ' Start a new document
End Sub

Private Sub FileOpen_Click()
    OpenDocument
    ' Open a document
End Sub

Private Sub FilePrint_Click()
    On Error Resume Next
    With CmDlg
        .DialogTitle = "Print Document..."
        .Flags = cdlPDReturnDC + cdlPDNoPageNums
        If rtfText.SelLength = 0 Then
            .Flags = .Flags + cdlPDAllPages
        Else
            .Flags = .Flags + cdlPDSelection
        End If
        .ShowPrinter
        If Err <> cdlCancel Then
            rtfText.SelPrint .hDC
        End If
    End With
End Sub

Private Sub FileSave_Click()
    SaveFile
    ' Save the current document
End Sub

Private Sub FileSaveAs_Click()
    rtfText.Tag = ""
    ' Set the current saved path of the document to null
    SaveFile
    ' Ask the user for new location to save the document
    ' This is the basic purpose of Save As function
End Sub

Private Sub FindScr_ButtonClick(ByVal Button As MSComctlLib.Button)
    Select Case Button.Key
        Case "Find"
            EditFind_Click
        Case "Replace"
            EditReplace_Click
        Case "Select"
            EditSelAll_Click
    End Select
End Sub

Private Sub Form_Load()
    Dim i As Integer
    ' Declares an integer 'i' for the multiple purposes
   
    ' From 8 to 12 with an increment of 1
    ' the numbers will be added to the cboSize combobox
    ' User selects the font size from this combo box
    For i = 8 To 12
        cboSize.AddItem i
    Next i
   
    ' From 14 to 28 with an increment of 2
    ' the numbers will be added
    For i = 14 To 28 Step 2
        cboSize.AddItem i
    Next i
   
    ' Added multiple sizes
    cboSize.AddItem 36
    cboSize.AddItem 48
    cboSize.AddItem 72
   
    ' All the fonts installed, will be added to the cboFont combo box
    For i = 1 To Screen.FontCount - 1
        If Screen.Fonts(i) <> "" Then cboFont.AddItem Screen.Fonts(i)
    Next i
   
    ' A new document is loaded i.e. blank document
    NewDocument
   
    ' Current document name is registered
    DocumentName = "Untitled"
End Sub

Private Sub Form_Resize()
    If StatusBar.Visible = True And RibbonBar.Visible = True And Not Me.WindowState = vbMinimized Then
        On Error Resume Next
        rtfText.Top = 1245
        rtfText.Width = Me.Width - 150
        rtfText.Height = Me.Height - RibbonBar.Height - StatusBar.Height - 820
    ElseIf StatusBar.Visible = True And RibbonBar.Visible = False And Not Me.WindowState = vbMinimized Then
        On Error Resume Next
        rtfText.Top = 0
        rtfText.Width = Me.Width - 150
        rtfText.Height = Me.Height - StatusBar.Height - 820
    ElseIf StatusBar.Visible = False And RibbonBar.Visible = True And Not Me.WindowState = vbMinimized Then
        On Error Resume Next
        rtfText.Top = 1245
        rtfText.Width = Me.Width - 150
        rtfText.Height = Me.Height - RibbonBar.Height - 820
    ElseIf StatusBar.Visible = False And RibbonBar.Visible = False And Not Me.WindowState = vbMinimized Then
        On Error Resume Next
        rtfText.Top = 0
        rtfText.Width = ScaleWidth
        rtfText.Height = ScaleHeight
    End If
End Sub

Private Sub Form_Unload(Cancel As Integer)
    ExitProgram
End Sub

Private Sub FormatAlignCenter_Click()
    rtfText.SelAlignment = rtfCenter
    FormatAlignLeft.Checked = False
    FormatAlignCenter.Checked = True
    FormatAlignRight.Checked = False
    LeftBar.Buttons(5).Value = tbrPressed
    LeftBar.Refresh
End Sub

Private Sub FormatAlignLeft_Click()
    rtfText.SelAlignment = rtfLeft
    FormatAlignLeft.Checked = True
    FormatAlignCenter.Checked = False
    FormatAlignRight.Checked = False
    LeftBar.Buttons(4).Value = tbrPressed
    LeftBar.Refresh
End Sub

Private Sub FormatAlignRight_Click()
    rtfText.SelAlignment = rtfRight
    FormatAlignLeft.Checked = False
    FormatAlignCenter.Checked = False
    FormatAlignRight.Checked = True
    LeftBar.Buttons(6).Value = tbrPressed
    LeftBar.Refresh
End Sub

Private Sub FormatAttrBold_Click()
    rtfText.SelBold = Not rtfText.SelBold
    BoldBar.Buttons(1).Value = IIf(rtfText.SelBold, tbrPressed, tbrUnpressed)
    FormatAttrBold.Checked = IIf(rtfText.SelBold, True, False)
End Sub

Private Sub FormatAttrItalic_Click()
    rtfText.SelItalic = Not rtfText.SelItalic
    BoldBar.Buttons(2).Value = IIf(rtfText.SelItalic, tbrPressed, tbrUnpressed)
    FormatAttrItalic.Checked = IIf(rtfText.SelItalic, True, False)
End Sub

Private Sub FormatAttrStrike_Click()
    rtfText.SelStrikeThru = Not rtfText.SelStrikeThru
    BoldBar.Buttons(4).Value = IIf(rtfText.SelStrikeThru, tbrPressed, tbrUnpressed)
    FormatAttrStrike.Checked = IIf(rtfText.SelStrikeThru, True, False)
End Sub

Private Sub FormatAttrUnderline_Click()
    rtfText.SelUnderline = Not rtfText.SelUnderline
    BoldBar.Buttons(3).Value = IIf(rtfText.SelUnderline, tbrPressed, tbrUnpressed)
    FormatAttrUnderline.Checked = IIf(rtfText.SelUnderline, True, False)
End Sub

Private Sub FormatFont_Click()
    With CmDlg
         .Flags = cdlCFEffects Or cdlCFForceFontExist Or cdlCFScreenFonts
         .FontName = rtfText.SelFontName
         .FontSize = rtfText.SelFontSize
         .Color = rtfText.SelColor
         .FontBold = rtfText.SelBold
         .FontItalic = rtfText.SelItalic
         .FontUnderline = rtfText.SelUnderline
         .FontStrikethru = rtfText.SelStrikeThru
         .ShowFont
            rtfText.SelFontName = .FontName
            rtfText.SelFontSize = .FontSize
            rtfText.SelBold = .FontBold
            BoldBar.Buttons(1).Value = IIf(.FontBold, tbrPressed, tbrUnpressed)
            FormatAttrBold.Checked = IIf(.FontBold, True, False)
            rtfText.SelItalic = .FontItalic
            BoldBar.Buttons(2).Value = IIf(.FontItalic, tbrPressed, tbrUnpressed)
            FormatAttrItalic.Checked = IIf(.FontItalic, True, False)
            rtfText.SelColor = .Color
            rtfText.SelStrikeThru = .FontStrikethru
            BoldBar.Buttons(4).Value = IIf(.FontStrikethru, tbrPressed, tbrUnpressed)
            FormatAttrStrike.Checked = IIf(.FontStrikethru, True, False)
            rtfText.SelUnderline = .FontUnderline
            BoldBar.Buttons(3).Value = IIf(.FontUnderline, tbrPressed, tbrUnpressed)
            FormatAttrUnderline.Checked = IIf(.FontUnderline, True, False)
            cboFont.Text = .FontName
            cboSize.Text = .FontSize
    End With
End Sub

Private Sub HelpAbout_Click()
    AboutScr.Show vbModal, Me
End Sub

Private Sub LeftBar_ButtonClick(ByVal Button As MSComctlLib.Button)
    Select Case Button.Key
        Case "Bullets" ' User pressed bullets button
            rtfText.BulletIndent = 720 ' About half of an inch
            rtfText.SelBullet = Not rtfText.SelBullet
            Button.Value = IIf(rtfText.SelBullet, tbrPressed, tbrUnpressed)
        Case "Spacing" ' User pressed Spacing (line spacing) button
            MsgBox "This tool isn't available. Sorry!", vbInformation, "XenonPad"
        Case "Background" ' User pressed page background color button
            On Error GoTo ColorErr
            With CmDlg
                .CancelError = True
                .ShowColor
                    If Not IsNull(.Color) Then
                        rtfText.BackColor = .Color
                    End If
            End With
        Case "Left" ' User pressed Align Left button
            rtfText.SelAlignment = rtfLeft
                FormatAlignLeft.Checked = True
                FormatAlignCenter.Checked = False
                FormatAlignRight.Checked = False
        Case "Center" ' User pressed Center button
            rtfText.SelAlignment = rtfCenter
                FormatAlignLeft.Checked = False
                FormatAlignCenter.Checked = True
                FormatAlignRight.Checked = False
        Case "Right" ' User pressed Align Right button
            rtfText.SelAlignment = rtfRight
                FormatAlignLeft.Checked = False
                FormatAlignCenter.Checked = False
                FormatAlignRight.Checked = True
    End Select
ColorErr:
    If Err.Number = 32755 Then Exit Sub ' Cancel was selected
End Sub

Private Sub NewBar_ButtonClick(ByVal Button As MSComctlLib.Button)
    NewDocument
End Sub

Private Sub OpenBar_ButtonClick(ByVal Button As MSComctlLib.Button)
    Select Case Button.Key
        Case "Open"
            OpenDocument
        Case "Print"
            FilePrint_Click
        Case "Save"
            SaveFile
        Case "Save As"
            rtfText.Tag = ""
            SaveFile
    End Select
End Sub

Private Sub PasteBar_ButtonClick(ByVal Button As MSComctlLib.Button)
    PasteFromClipboard
End Sub

Private Sub rtfText_Change()
    DocumentChange = True
End Sub

Private Sub rtfText_KeyDown(KeyCode As Integer, Shift As Integer)
    If Shift = vbCtrlMask And KeyCode = vbKeyV Then ' Ctrl + V
        Shift = 0
        KeyCode = 0
        PasteFromClipboard
    ElseIf Shift = vbCtrlMask And KeyCode = vbKeyX Then ' Ctrl + X
        Shift = 0
        KeyCode = 0
        EditCut_Click
    ElseIf Shift = vbCtrlMask And KeyCode = vbKeyC Then ' Ctrl + C
        Shift = 0
        KeyCode = 0
        EditCopy_Click
    ElseIf Shift = vbCtrlMask And KeyCode = vbKeyA Then ' Ctrl + A
        Shift = 0
        KeyCode = 0
        rtfText.SelStart = 0
        rtfText.SelLength = Len(rtfText.Text)
    ElseIf Shift = vbCtrlMask And KeyCode = vbKeyZ Then ' Ctrl + Z
        Shift = 0
        KeyCode = 0
        EditUndo_Click
    End If
End Sub

Private Sub rtfText_SelChange()
    FetchSel
End Sub

Private Sub ViewRibbonBar_Click()
    RibbonBar.Visible = Not RibbonBar.Visible
    ViewRibbonBar.Checked = RibbonBar.Visible
    Form_Resize
    rtfText.SetFocus
End Sub

Private Sub ViewStatusBar_Click()
    StatusBar.Visible = Not StatusBar.Visible
    ViewStatusBar.Checked = StatusBar.Visible
    Form_Resize
    rtfText.SetFocus
End Sub

Project Homepage: