Results 1 to 40 of 162

Thread: RichTextBox Tricks and Tips

Threaded View

  1. #10

    Thread Starter
    Old Member moeur's Avatar
    Join Date
    Nov 2004
    Location
    Wait'n for Free Stuff
    Posts
    2,712

    Find and Replace Common Dialog

    Until recently I didn't know that you could access the "Find-And-Replace" Common Dialog.
    Here is a class that makes it easy to access. The class will work with either a standard TextBox or a RichTextBox.
    Here is an example of how you might use the class.
    Code:
    Option Explicit
    
    'declare with events so that we can override the default
    'behavior of the class and/or handle ShowHelp
    Dim WithEvents FindDialog As clsFindandReplace
    
    Private Sub Form_Load()
        Set FindDialog = New clsFindandReplace
    End Sub
    
    Private Sub Command2_Click()
        'show the Find and Replace dialog box
        'pass the handle of our RichTextBox to
        'the class
        FindDialog.ShowReplace RTB.hwnd
    End Sub
    Attached Files Attached Files
    Last edited by moeur; Mar 12th, 2007 at 08:32 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width