DEFINE CLASS CTreeView AS OLECONTROL #INCLUDE TreeView.h .Object.Appearance = 1 .Object.BorderStyle = 0 .Object.Height = 185 .Object.Indentation = 20 .Object.LabelEdit = tvwManual .Object.Left = 12 .Object.LineStyle = tvwTreeLines .Object.MousePointer = 0 .Object.OLEDragMode = 0 .Object.OLEDropMode = 0 .Object.Style = tvwTreelinesPlusMinusPictureText .Object.Top = 12 .Object.Width = 150 Height = 185 Left = 12 Top = 12 Width = 150 PROCEDURE Click This.Parent.DisableCk.Refresh ENDPROC ENDDEFINE * The following creates the treeview on the form IF "6." $ VERSION() lctreeclass = "MSComctlLib.Treectrl.2" ELSE lctreeclass = "COMCTL.Treectrl.1" ENDIF SET PROCEDURE TO CTView ADDITIVE This.AddObject('ObjTree', "CTreeView", lctreeclass)I did this for people running VFP 5.0 that did not have the most recent Treeview control.