That person there is creating an inherited control. The control has been inherited from the existing RTB control, he's just adding his own routines to it and overriding a few existing routines.

You could start by... copy-pasting that code into a windows control project class library, compiling it, and then adding that control to another project ( a test project). Then start hacking away at the code.