home *** CD-ROM | disk | FTP | other *** search
Wrap
VERSION 5.00 Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "Comdlg32.ocx" Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "Comctl32.ocx" Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX" Object = "{FBC672E3-F04D-11D2-AFA5-E82C878FD532}#5.0#0"; "AS-IFce1.ocx" Object = "{A6BDE5D5-8F7A-11D1-9C65-4CA605C10E27}#5.0#0"; "ActiveGUI.ocx" Begin VB.Form frmMain Caption = "EzColorTest" ClientHeight = 4170 ClientLeft = 165 ClientTop = 450 ClientWidth = 7950 Icon = "frmMain.frx":0000 LinkTopic = "Form1" ScaleHeight = 4170 ScaleWidth = 7950 StartUpPosition = 2 'CenterScreen Begin ActiveGUICtl.ActiveToolbar ToolbarContainer Align = 1 'Align Top Height = 420 Left = 0 Top = 0 Width = 7950 _ExtentX = 14023 _ExtentY = 741 Begin AIFCmp1.asxToolbar MainToolbar Height = 375 Left = 120 Top = 30 Width = 5175 _ExtentX = 9128 _ExtentY = 661 BeginProperty ToolTipFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ButtonGap = 1 BorderStyle = 0 BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Appearance = 1 ButtonCount = 18 PlaySounds = 0 'False ShowSeparators = -1 'True ButtonKey1 = "NewFile" ButtonPicture1 = "frmMain.frx":0442 ButtonToolTipText1= "New File" ButtonKey2 = "Open" ButtonPicture2 = "frmMain.frx":0764 ButtonToolTipText2= "Open File" ButtonKey3 = "save" ButtonPicture3 = "frmMain.frx":0A26 ButtonToolTipText3= "Save File" ButtonStyle4 = 2 ButtonEnabled5 = 0 'False ButtonKey5 = "Cut" ButtonPicture5 = "frmMain.frx":0CE0 ButtonToolTipText5= "Cut Text" ButtonEnabled6 = 0 'False ButtonKey6 = "Copy" ButtonPicture6 = "frmMain.frx":0EBA ButtonToolTipText6= "Copy Text" ButtonKey7 = "Paste" ButtonPicture7 = "frmMain.frx":117C ButtonToolTipText7= "Paste Text" ButtonStyle8 = 2 ButtonKey9 = "undo" ButtonPicture9 = "frmMain.frx":146E ButtonToolTipText9= "Undo Action" ButtonKey10 = "redo" ButtonPicture10 = "frmMain.frx":15BC ButtonToolTipText10= "Redo Action" ButtonStyle11 = 2 ButtonKey12 = "Bold" ButtonPicture12 = "frmMain.frx":170A ButtonToolTipText12= "Bold" ButtonKey13 = "Italic" ButtonPicture13 = "frmMain.frx":1858 ButtonToolTipText13= "Italic" ButtonKey14 = "underline" ButtonPicture14 = "frmMain.frx":19A6 ButtonToolTipText14= "Underline" ButtonStyle15 = 2 ButtonKey16 = "LeftJustify" ButtonPicture16 = "frmMain.frx":1B18 ButtonToolTipText16= "Left Justify" ButtonKey17 = "HtmlCenter" ButtonPicture17 = "frmMain.frx":1D4E ButtonToolTipText17= "Center" ButtonKey18 = "rightjust" ButtonPicture18 = "frmMain.frx":1F84 ButtonToolTipText18= "Right Justify" End End Begin VB.CommandButton cmdDummy Height = 315 Left = 14040 TabIndex = 3 Top = 10560 Width = 1215 End Begin VB.PictureBox Container BackColor = &H00808080& Height = 2295 Left = 0 ScaleHeight = 2235 ScaleWidth = 5595 TabIndex = 1 Top = 440 Width = 5655 Begin RichTextLib.RichTextBox RichTxtBox Height = 1215 Left = 360 TabIndex = 2 Top = 0 Width = 2535 _ExtentX = 4471 _ExtentY = 2143 _Version = 327680 BorderStyle = 0 HideSelection = 0 'False ScrollBars = 3 Appearance = 0 TextRTF = $"frmMain.frx":21BA BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "Courier New" Size = 9 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End End Begin ComctlLib.StatusBar sbStatusBar Align = 2 'Align Bottom Height = 270 Left = 0 TabIndex = 0 Top = 3900 Width = 7950 _ExtentX = 14023 _ExtentY = 476 SimpleText = "" _Version = 327682 BeginProperty Panels {0713E89E-850A-101B-AFC0-4210102A8DA7} NumPanels = 4 BeginProperty Panel1 {0713E89F-850A-101B-AFC0-4210102A8DA7} AutoSize = 1 Object.Width = 9790 TextSave = "" Key = "" Object.Tag = "" EndProperty BeginProperty Panel2 {0713E89F-850A-101B-AFC0-4210102A8DA7} Style = 1 Alignment = 1 AutoSize = 2 Enabled = 0 'False Object.Width = 1244 MinWidth = 1235 TextSave = "CAPS" Key = "" Object.Tag = "" EndProperty BeginProperty Panel3 {0713E89F-850A-101B-AFC0-4210102A8DA7} Style = 2 Alignment = 1 Object.Width = 1235 MinWidth = 1235 TextSave = "NUM" Key = "" Object.Tag = "" EndProperty BeginProperty Panel4 {0713E89F-850A-101B-AFC0-4210102A8DA7} Style = 3 Alignment = 1 AutoSize = 2 Enabled = 0 'False Object.Width = 1244 MinWidth = 1235 TextSave = "INS" Key = "" Object.Tag = "" EndProperty EndProperty End Begin MSComDlg.CommonDialog CMDialog1 Left = 6960 Top = 480 _ExtentX = 847 _ExtentY = 847 _Version = 393216 End Begin VB.Menu mnuFile Caption = "&File" Begin VB.Menu mnuFileNew Caption = "&New" Shortcut = ^N End Begin VB.Menu mnuFileOpen Caption = "&Open" Shortcut = ^O End Begin VB.Menu mnuFileBar1 Caption = "-" End Begin VB.Menu mnuFileSave Caption = "&Save" Shortcut = ^S End Begin VB.Menu mnuFileSaveAs Caption = "Save &As..." End Begin VB.Menu mnuFileBar2 Caption = "-" End Begin VB.Menu mnuFileExit Caption = "E&xit" End End Begin VB.Menu mnuEdit Caption = "&Edit" Begin VB.Menu mnuEdit_Undo Caption = "Undo" Shortcut = ^Z End Begin VB.Menu mnuEdit_Redo Caption = "Redo" End Begin VB.Menu mnuEdit_Sep5 Caption = "-" End Begin VB.Menu mnuEdit_Cut Caption = "Cut" Shortcut = ^X End Begin VB.Menu mnuEdit_Copy Caption = "Copy" Shortcut = ^C End Begin VB.Menu mnuEdit_Paste Caption = "Paste" Shortcut = ^V End Begin VB.Menu mnuEdit_Sep2 Caption = "-" End Begin VB.Menu mnuEdit_SelectAll Caption = "Select All" Shortcut = ^A End End Begin VB.Menu mnuHelp Caption = "&Help" Begin VB.Menu mnuHelpAbout Caption = "&About EzColorTest..." End End Attribute VB_Name = "frmMain" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False ' -------------------------------------------------------------------------- ' EzColorTest HTML Editor Color Coding Test ' Copyright (C) 2000 Eric Banker ' This program is free software; you can redistribute it and/or modify ' it under the terms of the GNU General Public License as published by ' the Free Software Foundation; either version 2 of the License, or ' (at your option) any later version. ' This program is distributed in the hope that it will be useful, ' but WITHOUT ANY WARRANTY; without even the implied warranty of ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ' GNU General Public License for more details. ' You should have received a copy of the GNU General Public License ' along with this program; if not, write to the Free Software ' Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ' -------------------------------------------------------------------------- ' Some parts of this code were originally developed by Joel Dueck (BlueIce) and ' David Hoyt(Vhtml) Option Explicit ' This is for line numbering Private Declare Function SendMessageLong Lib "User32" Alias _ "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, _ ByVal wParam As Long, lParam As Long) As Long Private Const EM_LINEFROMCHAR = &HC9 Private Const EM_LINEINDEX = &HBB Private Const EM_LINELENGTH = &HC1 ' This variable keeps track of the currently opened file name at all times. Make sure you set it ' correctly so the user know's what is going on Public OpenFilename As String ' Editor constants Const WM_COPY = &H301 Const WM_CUT = &H300 Const WM_CLEAR = &H303 Const WM_PASTE = &H302 Public trapUndo As Boolean 'flag to indicate whether actions should be trapped Private UndoStack As New Collection 'collection of undo elements Private RedoStack As New Collection 'collection of redo elements ' Keeps track of control key state Public CtlKey As Boolean ' ################################################################ ' These are the main form handler functions ' ################################################################ ' This is the main load function. It sets up the colors and the richtextbox and inserts the template ' and also colorizes it Private Sub Form_Load() ' Let the user know something is happening, at least that the program is starting up :) Screen.MousePointer = vbHourglass ' Set the RichTextBox for the Color coding Control ' This is needed because of the way the control does it's color coding 'Set EZColorCode.RichTxtBox = RichTxtBox ' Set the colors: m_TextCol = vbBlack m_AttribCol = 8388736 m_TagCol = 10485760 m_CommentCol = 8421440 m_AspCol = 128 ' Now lets add the template and color code it. First hide the text box from the user RichTxtBox.Visible = False RichTxtBox.AutoVerbMenu = False RichTxtBox.HideSelection = True ' Now lets add a template to the new document AspTemplate ' That template still needs to be color coded so lets do that HtmlHighlight ' Lets set the caption of the form to say that this is an untitled document Me.Caption = "EzColorTest: Untitled" ' Lets let the user see the text box now that everything is finished RichTxtBox.Visible = True RichTxtBox.TabStop = True ' Everything is finished so lets set the mouse pointer back so the user knows the wait is over Screen.MousePointer = vbNormal trapUndo = True 'Enable Undo Trapping RichTxtBox_Change 'Initialize First Undo End Sub Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyControl Then CtlKey = True ElseIf KeyCode = vbKeyF6 And (Shift And vbAltMask) Then KeyCode = 0 End If End Sub Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyControl Then CtlKey = False End If End Sub ' This function simply makes sure the text box fits in the form at all times with the gutter Private Sub Form_Resize() On Error Resume Next Container.Width = Me.Width - 139 Container.Height = Me.Height - 1400 RichTxtBox.Width = Container.Width - 420 RichTxtBox.Height = Container.Height - 50 ' Make sure the dummy for undo never shows itself cmdDummy.Left = Me.Width + 1000 cmdDummy.Top = Me.Height + 1000 RichTxtBox.Refresh End Sub ' ################################################################ ' This is where the form handler functions stop ' ################################################################ ' ################################################################ ' This is where the RichTextBox handler functions go. These ' basically do everything. ' ################################################################ Private Sub RichTxtBox_Change() If Not trapUndo Then Exit Sub 'because trapping is disabled Dim newElement As New UndoElement 'create new undo element Dim c%, l& 'remove all redo items because of the change For c% = 1 To RedoStack.Count RedoStack.Remove 1 Next c% 'set the values of the new element newElement.SelStart = RichTxtBox.SelStart newElement.TextLen = Len(RichTxtBox.Text) newElement.Text = RichTxtBox.Text 'add it to the undo stack UndoStack.Add Item:=newElement EnableControls End Sub ' This makes sure that when the user hits the tab key that it ' indents the text Private Sub RichTxtBox_GotFocus() On Error Resume Next Dim Control As Control For Each Control In Controls Control.TabStop = False Next Control End Sub ' This makes the copy and paste menu items disabled when they can't be used Private Sub RichTxtBox_SelChange() Dim Ln As Long Ln = RichTxtBox.SelLength With frmMain ' Determine which options are available .mnuEdit_Cut.Enabled = Ln .mnuEdit_Copy.Enabled = Ln .mnuEdit_Paste.Enabled = Len(Clipboard.GetText(1)) .mnuEdit_SelectAll.Enabled = CBool(Len(RichTxtBox.Text)) .MainToolbar.ButtonEnabled(5) = Ln .MainToolbar.ButtonEnabled(6) = Ln .MainToolbar.ButtonEnabled(7) = Len(Clipboard.GetText(1)) End With GetEditStatus End Sub ' This highlights while typing ' This function in the module reads in the current character and colors the tag correctly. Private Sub RichTxtBox_KeyPress(KeyAscii As Integer) On Error Resume Next KeyAscii = KeyPressEvent(KeyAscii) End Sub ' This enables and disables the undo/redo options Private Sub EnableControls() Me.MainToolbar.ButtonEnabled(9) = UndoStack.Count > 1 Me.MainToolbar.ButtonEnabled(10) = RedoStack.Count > 0 Me.mnuEdit_Undo.Enabled = UndoStack.Count > 1 Me.mnuEdit_Redo.Enabled = RedoStack.Count > 0 Me.MainToolbar.ButtonEnabled(9) = Me.MainToolbar.ButtonEnabled(9) Me.MainToolbar.ButtonEnabled(10) = Me.MainToolbar.ButtonEnabled(10) Me.mnuEdit_Undo.Enabled = Me.mnuEdit_Undo.Enabled Me.mnuEdit_Redo.Enabled = Me.mnuEdit_Redo.Enabled RichTxtBox_SelChange End Sub ' This does some stuff like keeps track of the control character and knows when it is ' pressed or not. It also has some examples of keyboard shortcuts. For example hitting ' ctrl + 1 through 6 puts in the <h1></h1> tag all the way through <h6></h6> ' it also does ctrl+space which puts in , ctrl+enter which puts in <P> ' and shift+enter which puts in <br> ' it also finds out if the cursor is in a tag Private Sub RichTxtBox_KeyDown(KeyCode As Integer, Shift As Integer) Dim TypedIn As String If Shift And vbCtrlMask Then If KeyCode > vbKey0 And KeyCode < vbKey7 Then Dim HeadingTag As String HeadingTag = "<H" & CStr(KeyCode - vbKey0) & "></H" & CStr(KeyCode - vbKey0) & ">" InsertTag HeadingTag, True PlaceCursor HeadingTag, 5 RichTxtBox.SelColor = vbBlack Else Select Case KeyCode Case vbKeyV ' User pressed Ctrl+V - Paste Dim A$, S As Long S = RichTxtBox.SelStart ' save this since selstart moves up after the paste A = Clipboard.GetText(vbCFText) RichTxtBox.SelText = "" RichTxtBox.SelText = A ' This removes any unwanted formatting (font, &c) HtmlColorCode S, RichTxtBox.SelStart KeyCode = 0 Case vbKeyReturn InsertTag "<P>", True RichTxtBox.SelColor = vbBlack KeyCode = 0 Case vbKeySpace RichTxtBox.SelColor = vbBlack RichTxtBox.SelText = " " KeyCode = 0 End Select End If ElseIf Shift And vbShiftMask Then If KeyCode = vbKeyReturn Then InsertTag "<BR>", True RichTxtBox.SelColor = vbBlack KeyCode = 0 End If End If IsOutsideTag End Sub ' This function finds out if the user out the mouse inside a tag and sets the right color for ' the text Private Sub RichTxtBox_MouseDown(Button As Integer, Shift As Integer, X As Single, y As Single) IsOutsideTag 'RichTxtBox.SetFocus End Sub ' this resets the ctrl key if it was pressed to not pressed because the key was lifted ' it also finds out if the cursor is in a tag Private Sub RichTxtBox_KeyUp(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyControl Then CtlKey = False End If IsOutsideTag RichTxtBox.SetFocus End Sub ' this shows the edit menu on a right mouse click in the richtextbox. it also finds ' out if the cursor is in a tag Private Sub RichTxtBox_MouseUp(Button As Integer, Shift As Integer, X As Single, y As Single) ' Show edit menu If Button = vbRightButton Then PopupMenu mnuEdit End If IsOutsideTag 'RichTxtBox.SetFocus End Sub ' This gets the current line number and column number and displays it Public Sub GetEditStatus() Dim lLine As Long, lCol As Long Dim cCol As Long, lChar As Long, I As Long lChar = RichTxtBox.SelStart + 1 ' Get the line number lLine = 1 + SendMessageLong(RichTxtBox.hWnd, EM_LINEFROMCHAR, _ RichTxtBox.SelStart, 0&) ' Get the Character Position cCol = SendMessageLong(RichTxtBox.hWnd, EM_LINELENGTH, lChar - 1, 0&) FtEdiSnontrSpace RichTxtBox'Hf3m"dlcCIc" a tag PssagedolivbRightButton Then iiiiiiiiiiiiiiiiiiiiiiiiiiiit, 0&) iiiiiii0urslslslr.Butttate Su <e items8C th2 = "" As&ag i.hWnd, EM_LINELCp RichTxtBoCot9999999tate Su <e i cmdDummy .0#0"; Me.Ak 0displays itofHSr_cn6 Dim cCol As c0";et.SelColoritof 3f RiuDM9-blicThes i" ' it a Ak 0displays itg :Rich, EM_LINEL0 hTxtBoCot9999999tate SiuDM9-blsr3C t2r Set the2lsr3Cau <lk 0displays itg rY Inserted becauvater3en ot99999_cn6Ks0disas lift_cn6k 0dir 26F02"hsCot9au <lk n6 Dims0 LoneM_LI<DxtBoCo1B6C ^C ldp:oStahiftMoStmb######## ' Theritof ROMCHAR, _ Ri8mb#M( ows when it isMoStmbhFe ldp:oStah_en o8uF-vC cCol As bhFe ldp:os ^C ldp:oStahiftMoStmb###vC cCol As bhFe ldp:os ^C ldp:oStahiftMoStmb###vCePam :oStahiftMoStmb###vCePam :oStmb###etFocus End Su 1, l As bhFe ldLd3heritofF8Lgggg bhFe ldLd3heritofF8Lggg e S, RichTxtBox.Sel I End If rPam :ol kStmb##te -He0el IXe tof RichTxe fe ldp End If rPam :ol kT ' T7HxtBl kT.C6geriteoup EofE2-auva2ts up heritof ROMCHAR,0 = Un nT.C6geri55 ClcC6F0c1Set2ts up heritof ROMC tof RichTxtBoCot99 s Single) bgeri55MCHAR,0 = Un nT.C6ge4iSIf rPam :olCs#### ' Theritof ROMCHAR, _ tts 3f RiuDM a tag and sets th in a t a ta8pEnXR, _ tts 3f RiuDM a tag and sets th in a t a ta8pEnXR, _ tts 3f RiuDM a tagsMCHAR, _ U3heritofF8LePointer = vbNormal u1g6iSnontrSpace hTxtBox.SetFocus End Sub Ctts 3f RiuDM mb###vCeichTxtBo0 ir _ ;TUe InsertTag HeadingTag, oand sets th in a t a ta8pEn Ric4.C6ge4iSIf rPam :olCs#### ' T i IXe a3hei##vtBox.Sel:olCs##03FAF0c11Cs##03FAF0c11Cs##03Fe8BoCot9999999ox.SelStart mnuEdit End If IsOut2c inrEMA RiS.e ldta8pEn Rics1mOut2c inrEMA RicT 6tFocus End c bbo09t >E"ofEthe b###viuDM EMA R5 ec b#03FAF0c11Csb#03FAF0c11Csb_ tts 3f155MCHAR,,,,,,,,,,,,,,,,,,i4tnr SbDA Inse08fi5< vbKey7 Th 26F02"hsCo ^C ll Ucr = g6F02"hsCo Me"hsCo ^ ll Ucr = g6FAAR,,,,,,,,,,,,,,,,,,i4tnr SbD EndProperFocusye = R=,,,,8#####sb#03FAGs Ucr = g6FEnbsp;" Tg26TsnT.C6ge4iSIf rP = "&Edit" rl key if it was pres9 ened'Ri 0 'Box.SPell Ucr = g6F02"hsCo Me"hsCo ^c+tahifbterP = "&Eo .0#0"; MeGs Ucr = g6FEnbsp;" Tg/93 Shortcut FocCbsp;" Tgf Button = vbRightButton Then PopupMenu mnuEdit End If Ise up her5.iF on Th0) & ">" IoinontrSpace hTxtBox.SetFocus (BFocus EnYF8r6z.2 As Integer)mNrnmeger, X As Singlic8 utto+tahifbterP = "&Eo .no+tahifbterP onrl2.no+tahifbt1-8r60cr ramnnnnP = "&Eo .0#0";As Integer)mNrnmeger, X As Singlic8 utto+tahifbterP = "&Eo .no+tahifbterP o the user know's what is goinguser know's what isroperty End As Se-6ctmb###etSEo+t hwhat isy End As Se-6ctmE.bterP e-6ctmE.bterP e-6c bhFe3hei##vtBox.Sel:olCs##03FA End As Se-6ctmb###etSEo+t hwhanEfSr= "&Eo .0#0"0n user know's whrrope3FA End As Se-6ctmb###etSEo+t hwhanEfSr= "&o enu mnuFileExit C2n1e1<g i##vs Singlic8 utto+tahifbterP = "&Eo .no+tahifbterP o the user know's what is goinguser know's what isroperty En's what isroperty En's wha-hperty End_c Serty p i##vs Singlic8 utto+tahifbterP = "&Eo .no+tahifbterP o the user know's what is goinguser know's what isroperty En'ku rl key if it was pres999cter = "&ER=,,,ei;pterP o thslnas&ER=,,,ei;pox.SyRic7lN9-bliZ72Aave &As..." EeAr6terP = "&Eo .no+tahifbterP o the user know's what is goinguser know's what iCat _p#M( ows when it isMoS/Ks0dnirrWut FocCbsp;"nUs##03FAF0c11Cs##03Fe8BoCot9999999ox.Sed1 isroperty End As SelSox.Sed1 sn8B 0Enabled'ger)mNrnm6tert9999999ox.Sed1 isroperty 2 3fMCHAR, _ Ri8mb#M( owsCterP = ows whe fd A2e _ Ri8mb#M( owsCter2sn8B 0Epox.Se##03Fe8BoC0&o 'e8ocCbsp;Long, .ocAm_dSe##03Fe8BoC0&o 'e8ocC9 Key9ox c at _p#M( ows A2eRedo.EnS c at _p#M( o 8=,,,,8 Key9ox c at _p#M( ows An6 Me.mnuEditUn ,8 Key9ox c ion = "EzColorTest:#M( owsCter2sn8essed to not presst9ox.Sed1 isroperty y9ox c at _p#M( ows A2eRedo <e EFiopupMeLonnEfSr= "&EoRws A2eRedo e A2Eadi##vs Singlic8SEo+t hwhat8SEo+t hwhat8SEo+t hwhat8SEo+t hwhat8SEo+t hw ' the text.BUbtP.oUspM#M( ows#####sb# o RichTxtBoCot ows#####yas pres2o ###sb# o RichTxtBoCot ows####ws###norTn)Cwor chTxtBoCot ows#####yas pres2o #1s6Fprel; = 0 'False y'Falss "&ErAit was 1s6Fprel; = 0 'False Jh6 3f Rlse Jh6 3f Rlse 2 = 'itht if the _=nhcJh6 3f Rlse 2 = 'Ne r6py" 9iU0 e Jh6 k:oStahiftMf<brVD= 0 rx0Nm"uagedc 9oxrot oro .no+s.####sb#aow''e8ocC9 Kes1FrVDi##sb 'False p#M( ows A2eRedo.EnS c at _p#M( o 8=,,,,8 Key9ox c at _p#M( ows An6 9f7beoEn'ku lg( owsSub Fora .EnSns##PTb Fora .E:edo.E at _p#M( o 8=,,,,8 Key9ox c 'Key9ox re9oxrot oro .no+s.####sb#aow''e8ocC9 - 1400 uUindents the text Private Sub RichTxtBox_GotFoifbterP01a(fnIt.1yII0&ttox_GottiAyII0&ttox_GottiAyII0&tto8olCF Kes1FrVDi##sb 'Fn'Key9. e Jh6 ate Sub RichTxtBox_GotFoifb.l7I2RA RichTxtBox_GotFoifbUhp#M(a9M( ows sp;" Tg26TsnT.C6geo8olCF Kes1FrVDi##sb 'Fn'Key9. e Jh6 ate87yS2r7 2 it a Ak 0displays itg :Rich, EM_LINEL0 hTxtBoCot9999999tate SiuDM9-blsr3C 9beoEna An6 9f7beoEn'ku lg( owsSu 0nEfSr=p;" b 'Fn'Ke2d2eR owsSO2eR oKey-A u1"9beo2elt9999999tate SiuDM9-blsr3C 9bsA( ows#### fe 3&ahiftMf<brVD= iA( ows####l&s _p#& Jh6 ate Sub RichTh6 Jh6 atAs Long End)p#M( what is goinguser know's Ar .ocAEfSr= "&EoRws A2end)p#M( what is ( whPj6bEcb e evinglic8Sknopy" 9iU0 e ehs AUinSEo+t hwhanEfSfshwhanEfSfshwhanE e is ( whPjoC Kepgc ion )))))))" atAAAAAAAAif it was pres9Kepg)" 3&ahiftMf<brVD= = "&Eo .0#0"; D= "g)" whPjoC C ker8 EngEnab0"; D= "g)" whPjoC7tO2end)p#M( wh ker8 EngEnab0"; Key9ox c 'K rCs ker8nEna6f9ox x re9vuDM EMA R5 ec bs####cate Key6C EndttiAyIIFn'Ke&nAAx3Brot oCotI00 uUindents the text PC C ph En's wha-hn = "&Eo EiI43Or2sn8B 0Epox.Se##03Fe8BoC0&o 'e##03tst lg( owsSub Fora .EnS e Jh6 3f Rls EnkEsWn## BitEsWn## BitEsWn## etEsWn## BitEsWn## BitEsWOi4tnr SbDA Ins AUinSEow$owsSub Fora .EnS e ndttiAyIIFn'teger 5 9text 1111113beo2ttiAyIIFnrws###aMHFalse y't lzfshwolCs#1aShUc o the user know's wCotI00 :Rich, EM_LINEL0 hTxtBoCo0nEfSr=p;" b +d_lUitLriftMf<brVD== "&Eo .0#0"0n)A2U04Br4= "b =s"8H EMA R5 ec bs####cate K"1111T &As..." EeAr6terP l0h 1AAAAArag "<BR>uN,(th7"C3 &As..." EeAr6ser kn"<BR>uN,a0xIgSub ' This highlights wHE a tag an'teger 5 9textniU Jh6 Undo.Enabled i pres2o b#M(whPjoC7tO2en know somet5 ec bsTE> 3cec bsTE> 3cec bs####cate Key6C PjoC7tO2en know sVst5 ec"<BR>uN,(th7 KiiiiiBoC0s####cate Key6C Pjot 2whPjoC7tO2ens 1 +dW0agewf_LINEa1000 m e KeD C2n1e1<g i##vgFbeD Enaws#### :wha-hperty PjoC7tO2en:bgU :wlsWOibledcxtBoCo0Rmbsp; , ctrC EndttiAyIIFn'Ke& 2whPjrt5 ec"<BR>uN,(th7 KiiiiiBoClCh7 Kiino+tas'Ke& n'Ke& 2whPjrt5 ec"<BR>uN,(th7 tuhighli+d_SjlnndttiAyIIFn'u3Dttuhighli#vgFbUe ty E"></H" & CStr(KeyCode2wlsWOibledcxtBoCo0Rmbsp; , ctrC EndttiAyIIF 2wlsWOi n'KUCng 0do."n the _=nhcJh6 fTAyIIF 2w5 "n the CStr(KeyCodwTr(K ctrC EndttiAyIIF 2wls +tahifbterP o ogEr) Dim TypedIn As String If Shift And vbCtrlMask Then If KeyCode > vbKey0 And KeyCode < vbKey7 Then Dim HeadingTag As String HeadingTag = "<H" & CStr(KeyCode - vbKey0) & "></H" & CStr(KeyCode - vbKey0) & ">" 34xhifbt lbKey0) & CSt=34xhifbt 0ShifbHTypes2en: vbKey0) & ">" yIIFnrws###aMH c0) & CSt=34xhic2R=34xhiMH c0) oCotI00 uUindents the telSuIIFnrws###aMH c0lo 0s6lE AnledcxtBoCo0Rmbsp; hiMHey087h1tF{</H" & CSolCs##03FA End As Se-6ctmb##MA.ey0) &u4brdctlue9lSEo+t hwhat7EndUCsong lCyS2r7 0b0) & CSt=34d9.Color = "Color = "Color = "Color = "Color = "Color = "Color = "Color = "Color = "Color = "Color C "Colo0 uUie2R=3ColoA 1dUC "Color = "u6C PjotA "ColoC 92Cod utto+tahifbterP = "&E uUie2R=3oC 6C Pjo>,. = scresec"<BR ec"<BRBR ec"<BRBR ecaC 6A6no6lo0 uhatTeyCtB "Color = "Color ='Ee2SIl7x c at _p#M( ows2rl2.nouhi4 Me.mnuEdit_Redo5EB}_p#M( o B0hbtP.oUs5ah, E902"></t=34d9.CoT = "Color = "n e c0lo P6s Mc c0lo P6s MSub RieyCode2wlsP0lo Pa6s My9ox&2 = 'itht if the _=nhcJh6 3f Rlse 2 = 'Ne r6py" 9iU0 e e = 'Ni MTn .ocAm_dSC =34d9.CoT =aedo5EPpkPjo>,. = scresec##aM0s AUinSEo+t hw = "n ePsw .noN R6ug( ot _p#M(f Rlse 2 = 'Ne Get 4aM0s AUinSEo+t h6 uset isroperty End As enettn25SC = .oCo0RmCAHTand Us5- enettn25SC = .oCAs Sinc0loiiiBoC M"oP6 2 = 'Ne Gett}c 'Key9ox re9oxrolue AUilse 2 or =End As enettn25SC = .oCmnuHsR-n:whPjoC7 2 ootlorOgp +tahifbterP o ogEr) Dim TypedIn As c0) oCotI00 uUindentss it h6 uAUilse rh6 As eYf1nd As enetbCe e2 ootreulot _t5rO5SC As eYf1nd"lnguser know'brVD= = "&Eo .0#0"; D= "got _p#M(f.nou "&Eo .0#0"0bternT 2 ootlorOgp_=nhc.h iw'brVD= = nd As enettn25S0ot _p#M(f.nolnguser know'brVD= = g nf6.l7I2RA RichTxtBob RichTh6 Jh6 atAs L CaS2RA Ric=nht RichTh6 Jh6 a2S2RA Rnht Rich'& = 'Ne G n'KdttiAe oknow'rht Rich'& RichanE e 74user know P6s Mc nht Ric 'Ne G cfow P0 fd A2e _ Ri8mb#1I oCotI00 uU ox_G Sub ForH##### ' This is where td1 ie5cA RichTh6 2ColoA 1dUC "Color = shw = "n ePsw .noN R6ug1 'Nee2Cf4uts i0nSEo+t hBoC Mc>whP2v R6ucaC 6Cotreulo625 Mc>whP2v R6ucaC 6Cotreuichach'& = 'oichTsuhi4 n'KdttiAe okntreuoooooooooo0Sub u,7edoLtL6255BCu,7edoLtL62N r= "&o enu mnuFil<BR epM7 2 it a Ak 0ded1 m0ows2rl2.nouhi4 Me.mnuEdit.N,(th7ox_GotF0ph6 2ColoA 1dUC "ColoCotre-anE e 755B'###snl ootlorOgp Color = "Color C "Colo0 uUiTTwhPc2e _ Ri8mb#1I oCotI00 uU re8sFaA A2e _ Ri8mb#1I oCotI00 s the copyA2e _T2e _ Ri8mb#1I oCotI001I & CSt=34xhifbt 0Sh"Color = 'brVd,,,,,,,,,,,i_Ir Cbi" awh6 atAs L CaS2RAzodNz- epM7 hPjrt5 ec"<BLi0nSEogVo+t hwhat8SCRichTh6 ic 'Ne G cfow P0 fd A2e _ uUiTTwhPc2e _ Ri8mb#1IiC Mc>a2S2RA pres9Kepg)" 3&ahiftMf<brVD= 01I & CSt=34x&ahiB xk Cahifbte'Ne G coCotI00 s the copyA2e _T2e _ Ri8mbrslslssltreuoooooooooSvobPa9MbpgEnab0"; D= "gh6 .1_hiB xk Cahifbte'Ne G 2ABR>uNfr&ahiB 0Sh" 17nab0iB s coCAe Diahifbguser know's Ar .ocAE& copyyyyyyColo0 uUiTs L Sw's Ar .ocAE& copyyYB7C0V2 = "&E uU= "g)" w,7edocAE& #cate Key6C Pjot 2whPj5e =121nd"lnguser know" wSTAk 0dis A2e _R23Pt "gs9 ened'Ri 0 'B &ahiB 0S0wTr(K ctrC EndttiuAs Sinc0loia Ak 0ded1 mhiB 2O"Co3gAtgc yAr . olg( 9oTonr Sa3yYB7C0V2r Sa3C = 0 'False y'Fx9 en0RmbVE en0Rmbuoooooo= 5B'###snl ootcAE& #cate Key6C PjottTkno02uootcrht RiW ' Th6 ic 'Ne t5 ec"<BR>uN,(th7 AhPj55Pc"< ctrC EndttiuAs Sinc0loia Ak 0ded1px0Nm&ahiB 0SCgc yAr mbrslslSa3y0Tkno02uootcrht RiW ' Th6 Tp = w = "n ePsmV Dim Headi pl3Vr}6 B "Colo en0Rmw9eE_ht RiW ' Th6 Tp = w ePsw .noNip w = "TrSy6C c2< vbKey7ia6f9SelSox.SederP cx0Nm&aT' ooooooooIn AstiuAs k&e K cx0Nm&aT' oooooooo"n flaC 6nub uenet4r9SelSoxBa........w2e _T2e _ Ri8eC-9ingusso2elt99s k&e K cxtoIn AstiuAs o.2fSfshs o.2fSfshs o.2fSfshsp34xhifbtfSfshsA li#vgFbUe A(Csb#0gEfSr=p;" b +d_lUiHe _ Ri8mb#1I sb#0otcAE& #crlH=34xhifbt 0Sh"ColD0Tkno d"FiMHey08m&amb#1I sb# y6CesMtnWwxnF0c11C = 0 'False y'Fx9 en0RmbVE en0RmbuoolLlorCooolbFD0Tkno d"FiMHukno d"FiMHey08m&amb#1I sb# y6CesMtt iesMtt iuAw1:c1p34ESox.0en0euoom uhighli+d_SjlnndttiAyIIFn'u3fnKR#03FA L1tiAyIwCFA En9os 0SC0vtuooms##A;d_lUiHe _ Ri8mb#1I sb#yIIFb21esdtEsWOi4t0s k&e K cx0Nmin a tag gCo rrC' Th6 ic 'Ne t5 ec"B7ooms##A;d_lUiHe w fAAAATe1p34ESox.cdet411p34ESoi)c.w2e _T2e _ Ri8eC-9ingu.Hukno d"FiMHey08m&aI sb#yIIFb21esdtEsWOi4tSC _T2.As..." EeAr6terP lu92o"Color = EeAr6terP lu 9C' Th6 ic 'Ne t5 ec"B7Ri8eC-9ingusso2elt99s i0 eciD&e K ri8mb#1I sb#0otcAE& #cr8eC-9it 0Sh"ColD0Tkno d"FiMHey08m&Eit menu on abKe## eNH7tO21N34ESox.cdet411p34ESoi)c.w2e _T28vabK&71nlUIit.N,(th7ox_GotF0ph6 2ColoA (. "5I} 0y" e k 9textnp w hwhawAr mbrslslSa3y0Tkno02uootcrDHukno d"FiMHey08m&aC<etahiftabK02uoot9 _ Ri8mb#1I oecePk)De7Ri8 4T"n ePsmV Di.6t9 _ Ri8mb#1I oecePk)D)D)Dwha)u6C PjottTAAsK cx0Nm&aT' oooooo cx0Nmin a tag gCoufftHFmenu on 01 1 1 1-9it fho8 Denu on 01 1 1 1-9it fho8 D sb#0 w hwhawAr mbrslslS7BiftabK02uoot9 _ Ri8mb#1I pmbrs0tu92o"ColooloA (. "5I} 0y" e k 9textnTi" e k 9textnTi" e kg Denu >ottawAr mbrslI-= Rlse r&aT' ooE a2S2RAe&B'###snl ootcAE& #catlh6 Un (4E a2"ColooloA (. "5I} 0y" e k 9textoA (. "5I} 0y" e k 9textoA iA"FiMHei6terP lu92o"eloA (. "5I} 0y" e k 9tex8m& 0 'B &ahiBbI} 0oooo"n flaC 6nub ueniAfU utto+ty" e nftabK02;&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A (&A