Sometimes you want to provide a RichTextBox control wrapped with some buttons and logic to let the user interact with it as a somewht fuller-featured editor for RTF data. This is easy enough but a little tedious to do over and over again.
RTBCompose is a UserControl for this which you can add to your Projects and drop into your Forms. It helps keep the fiddly button handling logic out of your Forms and away from your business logic.
Uses
The attached demo is a small Project using RTBCompose to create a sort of stripped-down WordPad like program.
A more practical use might be programs that let a user compose and send RTF messages. This is why the SendButton option exists in RTBCompose.
You may also have a database that contains RTF-format Memo fields that you need users to be able to enter text into and/or edit existing text.
What it adds
RTBCompose provides a simple button bar supporting common rich editing operations such as cut, copy, paste, bold, etc.
It also adds a font/color "picker" based on the Font Common Dialog (ChooseFont API) wrapped in a way that makes it "work like" the VB6 CommonDialog control.
And it also has a button for "insert picture."
It adds Ctrl-B, Ctrl-I, and Ctrl-U keystrokes in addition to the Ctrl-C, Ctrl-V, and Ctrl-X natively supported by the RichTextBox control. Users get used to these in other programs and get to expect them.
There are other misc. features such as a left-right Margins property, a SendClicked event linked to the Send button you may not need, an IsDirty property and IsDirtyChanged event useful for adjusting things like menu item enabled status in the parent Form and detecting unsaved changes.
What it subtracts
RTBCompose only exposes a few things like the RichTextBox's base Font, Text, and RTFText properties and the LoadFile and SaveFile methods. It already takes care of most of the Selxxx properties with its own code, so you generally would not need them in the parent Form.
Since you have the full source you could expose more properties, add or remove buttons, implement drag/drop, etc. as required.
System Requirements
Should pretty much work on any system that VB6 programs run on.
RTBCompose is a UserControl for this which you can add to your Projects and drop into your Forms. It helps keep the fiddly button handling logic out of your Forms and away from your business logic.
Uses
The attached demo is a small Project using RTBCompose to create a sort of stripped-down WordPad like program.
A more practical use might be programs that let a user compose and send RTF messages. This is why the SendButton option exists in RTBCompose.
You may also have a database that contains RTF-format Memo fields that you need users to be able to enter text into and/or edit existing text.
What it adds
RTBCompose provides a simple button bar supporting common rich editing operations such as cut, copy, paste, bold, etc.
It also adds a font/color "picker" based on the Font Common Dialog (ChooseFont API) wrapped in a way that makes it "work like" the VB6 CommonDialog control.
And it also has a button for "insert picture."
It adds Ctrl-B, Ctrl-I, and Ctrl-U keystrokes in addition to the Ctrl-C, Ctrl-V, and Ctrl-X natively supported by the RichTextBox control. Users get used to these in other programs and get to expect them.
There are other misc. features such as a left-right Margins property, a SendClicked event linked to the Send button you may not need, an IsDirty property and IsDirtyChanged event useful for adjusting things like menu item enabled status in the parent Form and detecting unsaved changes.
What it subtracts
RTBCompose only exposes a few things like the RichTextBox's base Font, Text, and RTFText properties and the LoadFile and SaveFile methods. It already takes care of most of the Selxxx properties with its own code, so you generally would not need them in the parent Form.
Since you have the full source you could expose more properties, add or remove buttons, implement drag/drop, etc. as required.
System Requirements
Should pretty much work on any system that VB6 programs run on.