Article ID: 132568
Article Last Modified on 8/20/1999
Oobject1=CREATEOBJECT(<olecustomcontrol>)
oMyform=CREATEOBJECT('new_form')
oMyform.SHOW
* The following lines add three items to the outline control.
oMyform.myoutline.ADDITEM('VFP',0)
oMyform.myoutline.indent(0)=1
oMyform.myoutline.ADDITEM('Samples',1)
oMyform.myoutline.indent(1)=2
oMyform.myoutline.ADDITEM('Controls',2)
oMyform.myoutline.indent(2)=3
READ EVENTS
* Form class definition. The form contains a command button and an
* olecontrol
DEFINE CLASS new_form AS FORM
AUTOCENTER=.T.
BACKCOLOR=RGB(192,192,192)
WIDTH= 220
HEIGHT= 200
CAPTION= "Using the outline control"
ADD OBJECT myoutline AS outlinecontrol
ADD OBJECT mycmd AS cmdquit WITH TOP=120, LEFT=80
ENDDEFINE
* Defines the Ole container control. The OLE class is MSOutl. Outline.
* The Outline control is used.
DEFINE CLASS outlinecontrol AS OLECONTROL
OLECLASS = "MSOutl.Outline"
LEFT=12
Top=12
Width=170
Height=80
FontSize=10
FontName="Arial"
FontBold=.F.
FontItalic=.T.
ENDDEFINE
* Class definition for the command button. When users click the command
* button, the form is released.
DEFINE CLASS cmdquit AS COMMANDBUTTON
Width=40
Height=25
Caption = "Quit"
PROCEDURE CLICK
RELEASE ThisForm
CLEAR EVENTS
ENDPROC
ENDDEFINE
ON ERROR ? "-------------------------> "+message()
oObj1=CREATEOBJECT("Word.Basic")
oObj2= CREATEOBJECT("Excel.Sheet")
oObj5= CREATEOBJECT('msoutl.outline')
ON ERROR
Additional query words: VFoxWin crash
Keywords: KB132568