The following code example demonstrates how to use the BeforeLabelEditAfterSelect and TopNode members. To run this example, paste the following code in a form that contains a TreeView control that is named TreeView1. Call the InitializeTreeView method in the form's constructor or Load method.

The following method shows the use of the LabelEdit property.
Add this method to a form containing a ListBox control named ListBox1.
Call the method in the constructor or Load method of the form.
...
The following class inherits from the Button class and overrides
the OnMouseHover and OnMouseMove methods to give the button
some special behavior. To use this example create a new form and copy paste this class in the same file, after the form class. Add a button of
type FunButton, defined in the code example, to the form.