112:
How can I display a chart/organigram view inside

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu
	LOCAL oChartView
	LOCAL oControl
	LOCAL oMenu
	LOCAL oNodes

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oMenu := oExMenu:Items()
			oMenu:Add("File")
			oControl := oMenu:Add("OrgChart",3):SubControl()
				oControl:ControlID := "Exontrol.ChartView"
				oControl:Width := 128
				oControl:Height := 164
				oControl:Create()
				oChartView := oControl:Object()
					oChartView:IndentSiblingY := 30
					oChartView:ShowLinksDir := .T.
					oChartView:PenWidthLink := 2
					oChartView:SetProperty("LinkColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
					oChartView:AntiAliasing := .T.
					oNodes := oChartView:Nodes()
						oNodes:Add("L1_A",,"LA"):ShowLinkDir := .F.
						oNodes:Add("L1_B",,"LB")
						oNodes:Add("L2_A","LA","LA2")
						oNodes:Add("L2_B","LB","LB2")
			oMenu:Add("Close")
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
111:
How do I uncheck the item

PROCEDURE OnSelect(oExMenu,ID)
	/*Item(ID).Check = False*/
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu
	LOCAL oitem
	LOCAL oMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Select := {|ID| OnSelect(oExMenu,ID)} /*Occurs when an item is selected by clicking or by pressing RETURN key.*/

		oMenu := oExMenu:Items()
			oitem := oMenu:Add("Horizontal View",,210)
				oitem:Check := .T.
				oitem:CheckEffect := .F.
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
110:
How do I get the identifier of the item being clicked / selected

PROCEDURE OnSelect(oExMenu,ID)
	DevOut( "Using ID parameter:" )
	DevOut( Transform(ID,"") )
	DevOut( "Using the EventParam property: " )
	DevOut( Transform(oExMenu:EventParam(0),"") )
	DevOut( "Using the ExecuteTemplate property: " )
	DevOut( Transform(oExMenu:ExecuteTemplate("EventParam(0)"),"") )
	oExMenu:Template := "EventParam(0)"
	DevOut( "Using TemplateResult property:" )
	DevOut( Transform(oExMenu:TemplateResult(),"") )
	DevOut( "Using TemplateResultN property:" )
	DevOut( Transform(oExMenu:TemplateResultN(),"") )
	DevOut( "Using TemplateResultS property:" )
	DevOut( oExMenu:TemplateResultS() )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Select := {|ID| OnSelect(oExMenu,ID)} /*Occurs when an item is selected by clicking or by pressing RETURN key.*/

		oExMenu:Items():ToString := "A[id=10](B[id=20],C[id=30](D[id=40],E[id=50]),F[id=60])"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
109:
How can I assign an icon to an item using an external ICO file

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:SetProperty("HTMLPicture","ico1","C:\Program Files\Exontrol\ExMenu\Sample\VC\Sample\res\sample.ico")
		oExMenu:Items():Add("<img>ico1:16</img> Caption")
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
108:
How can I assign an icon to an item using an external ICO file

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:ReplaceIcon(oExMenu:ExecuteTemplate("loadpicture(`C:\Program Files\Exontrol\ExMenu\Sample\VC\Sample\res\sample.ico`)"))
		oExMenu:Items():Add("Caption",0):Image := 0
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
107:
How can I assign a tooltip for an item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu
	LOCAL oitem
	LOCAL oMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oMenu := oExMenu:Items():Add("Popup",2):SubMenu()
			oitem := oMenu:Add("ToolTip     CTRL + <b>F</b>")
				oitem:Tooltip := "This is a bit of text that should be displayed when the cursor hovers the item"
				oitem:TooltipTitle := "Title"
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
106:
How can I specify some keys on the right of the item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu
	LOCAL oMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oMenu := oExMenu:Items():Add("Popup",2):SubMenu()
			oMenu:Add("File     CTRL + <b>F</b>")
			oMenu:Add("Left should be a long text")
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
105:
How do I specify the item's alignment

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu
	LOCAL oMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oMenu := oExMenu:Items():Add("Popup",2):SubMenu()
			oMenu:Add("Left<r>Right")
			oMenu:Add("Left should be a long text")
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
104:
How do I specify the item's alignment

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu
	LOCAL oMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oMenu := oExMenu:Items():Add("Popup",2):SubMenu()
			oMenu:Add("Center"):Alignment := 1/*exCenter*/
			oMenu:Add("Right"):Alignment := 2/*exRight*/
			oMenu:Add("Left should be a long text")
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
103:
How can I remove the border of the item's text box or an edit control

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu
	LOCAL oitem
	LOCAL oMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oMenu := oExMenu:Items():Add("Popup",2):SubMenu()
			oitem := oMenu:Add("Edit 1")
				oitem:AllowEdit := .T.
				oitem:EditCaption := "test"
				oitem:EditWidth := 128
				oitem:EditBorder := 0/*exEditBorderNone*/
			oMenu:Add("Edit 2"):AllowEdit := .T.
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
102:
How can I specify a single border for the item's text box or an edit control

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu
	LOCAL oitem
	LOCAL oMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oMenu := oExMenu:Items():Add("Popup",2):SubMenu()
			oitem := oMenu:Add("Edit 1")
				oitem:AllowEdit := .T.
				oitem:EditCaption := "test"
				oitem:EditWidth := 128
				oitem:EditBorder := 1/*exEditBorderSingle*/
			oMenu:Add("Edit 2"):AllowEdit := .T.
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
101:
How can I add a checkbox

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu
	LOCAL oitem

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oitem := oExMenu:Items():Add("Checked")
			oitem:Check := .T.
			oitem:CheckEffect := .F.
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
100:
How can I specify the shape of the cursor while it hovers an item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu
	LOCAL oMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oMenu := oExMenu:Items():Add("Popup",2):SubMenu()
			oMenu:Add("Item 1"):Cursor := "exHelp"
			oMenu:Add("Item 2")
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
99:
How can I specify the width for text box or an edit control

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu
	LOCAL oitem
	LOCAL oMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oMenu := oExMenu:Items():Add("Popup",2):SubMenu()
			oitem := oMenu:Add("Edit 1")
				oitem:AllowEdit := .T.
				oitem:EditCaption := "test"
				oitem:EditWidth := 128
			oMenu:Add("Edit 2"):AllowEdit := .T.
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
98:
How can I show or hide an item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu
	LOCAL oitem
	LOCAL oMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oitem := oExMenu:Items():Add("Popup",2)
			oMenu := oitem:SubMenu()
				oMenu:Add("Visible")
				oMenu:Add("Hidden"):Visible := .F.
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
97:
Is there any function to display the popup menu up not down

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu
	LOCAL oitem
	LOCAL oMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Items():Add("Item")
		oitem := oExMenu:Items():Add("Popup",2)
			oitem:ShowDown := .F.
			oMenu := oitem:SubMenu()
				oMenu:Add("Item <fgcolor=FF0000>1</fgcolor>")
				oMenu:Add("Item 2"):Caption := "Item <fgcolor=FF0000>2</fgcolor>"
		oExMenu:Items():Add("Item")
		oExMenu:Appearance := 0/*Normal*/
		oExMenu:Border := 2/*SunkenBorder*/
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
96:
How can I specify the item's foreground color

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu
	LOCAL oMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oMenu := oExMenu:Items():Add("Popup",2):SubMenu()
			oMenu:Add("Item <fgcolor=FF0000>1</fgcolor>")
			oMenu:Add("Item 2"):Caption := "Item <fgcolor=FF0000>2</fgcolor>"
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
95:
How can I specify the item's foreground color

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu
	LOCAL oMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oMenu := oExMenu:Items():Add("Popup",2):SubMenu()
			oMenu:Add("Item 1"):SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
			oMenu:Add("Item 2")
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
94:
How can I specify the item's background color

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu
	LOCAL oMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oMenu := oExMenu:Items():Add("Popup",2):SubMenu()
			oMenu:Add("Item 1"):SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
			oMenu:Add("Item 2")
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
93:
How can I add an item with a text box or an edit control

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu
	LOCAL oitem
	LOCAL oMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oMenu := oExMenu:Items():Add("Popup",2):SubMenu()
			oitem := oMenu:Add("Edit 1")
				oitem:AllowEdit := .T.
				oitem:EditCaption := "test"
			oMenu:Add("Edit 2"):AllowEdit := .T.
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
92:
How can I add an item with a text box or an edit control

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu
	LOCAL oMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oMenu := oExMenu:Items():Add("Popup",2):SubMenu()
			oMenu:Add("Edit 1"):AllowEdit := .T.
			oMenu:Add("Edit 2"):AllowEdit := .T.
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
91:
How can I add a bullet

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu
	LOCAL oitem

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oitem := oExMenu:Items():Add("Bullet")
			oitem:Check := .T.
			oitem:Bullet := .T.
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
90:
How can I add a checkbox

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Items():Add("Checked"):Check := .T.
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
89:
How can I enable or disable an item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Items():Add("Disabled"):Enabled := .F.
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
88:
How can I display an icon

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oExMenu:Items():Add("A"):Image := 1
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
87:
How can I specify the item's identifier

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Items():Add("A"):ID := 1000
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
86:
How can I specify the item's identifier

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Items():Add("A",0,1000)
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
85:
How can I assign an extra data to an item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"
		oExMenu:Items:item(10):UserData := "your data"
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
84:
How can I underline an item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"
		oExMenu:Items:item(10):Caption := "Item <u>1</u>"
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
83:
How can I underline an item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"
		oExMenu:Items:item(10):Underline := .T.
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
82:
How can I display as strikeout an item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"
		oExMenu:Items:item(10):Caption := "Item <s>1</s>"
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
81:
How can I display as strikeout an item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"
		oExMenu:Items:item(10):Strikeout := .T.
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
80:
How can I display as italic an item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"
		oExMenu:Items:item(10):Caption := "Item <i>1</i>"
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
79:
How can I display as italic an item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"
		oExMenu:Items:item(10):Italic := .T.
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
78:
How do I bold an item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"
		oExMenu:Items:item(10):Caption := "Item <b>1</b>"
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
77:
How do I bold an item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"
		oExMenu:Items:item(10):Bold := .T.
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
76:
How do I change the item's caption

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"
		oExMenu:Items:item(10):Caption := "new <b>caption</b>"
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
75:
How can I speciy the picture on the drop down menu

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"
		oExMenu:Items:item(10):SubMenu():Picture := oExMenu:ExecuteTemplate("loadpicture(`c:\exontrol\images\zipdisk.gif`)")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
74:
How can I speciy the number of visible items

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"
		oExMenu:Items:item(10):SubMenu():VisibleItemsCount := 1

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
73:
How can I speciy the shape of the cursor when it hovers the menu

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"
		oExMenu:Items:item(10):Cursor := "exHelp"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
72:
How can I add items

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
71:
How I can remove an item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"
		oExMenu:Items():Remove(10)
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
70:
How I can get the number or the count of the items in the menu

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu
	LOCAL oMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"
		oMenu := oExMenu:Items()
			oMenu:Add(Transform(oMenu:Count(),""))
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
69:
How I can clear a menu

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"
		oExMenu:Items():Clear()
		oExMenu:Items():ToString := "Item 1"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
68:
How do I specify to close an ActiveX item when user clicks it

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu
	LOCAL oCalendar
	LOCAL oControl

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oControl := oExMenu:Items():Add("Calendar",3):SubControl()
			oControl:ControlID := "MSCal.Calendar"
			oControl:Width := 256
			oControl:Height := 196
			oControl:Create()
			oCalendar := oControl:Object()
				oCalendar:ShowDateSelectors := .F.
				oCalendar:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 239,239,231 } )  , .F. ))
			oControl:CloseOn := 514/*exLButtonUp*/
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
67:
How can I access the properties and methods for an ActiveX item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu
	LOCAL oCalendar
	LOCAL oControl

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oControl := oExMenu:Items():Add("Calendar",3):SubControl()
			oControl:ControlID := "MSCal.Calendar"
			oControl:Width := 256
			oControl:Height := 196
			oControl:Create()
			oCalendar := oControl:Object()
				oCalendar:ShowDateSelectors := .F.
				oCalendar:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 239,239,231 } )  , .F. ))
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
66:
I can't see the ActiveX item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu
	LOCAL oControl

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oControl := oExMenu:Items():Add("Calendar",3):SubControl()
			oControl:ControlID := "MSCal.Calendar"
			oControl:Create()
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
65:
How can I specify the runtime license key for an ActiveX item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu
	LOCAL oControl

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oControl := oExMenu:Items():Add("Calendar",3):SubControl()
			oControl:ControlID := "MSCal.Calendar"
			oControl:LicenseKey := ""
			oControl:Create()
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
64:
How can I specify the width and the height for an ActiveX item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu
	LOCAL oControl

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oControl := oExMenu:Items():Add("Calendar",3):SubControl()
			oControl:ControlID := "MSCal.Calendar"
			oControl:Width := 256
			oControl:Height := 256
			oControl:Create()
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
63:
How can I select a date

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu
	LOCAL oControl
	LOCAL oDTPicker
	LOCAL oMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oMenu := oExMenu:Items():Add("Popup",2):SubMenu()
			oControl := oMenu:Add("Select a date",3):SubControl()
				oControl:ControlID := "MSComCtl2.DTPicker"
				oControl:Width := 128
				oControl:Height := 22
				oControl:Create()
				oDTPicker := oControl:Object()
					oDTPicker:Format := 3/*dtpCustom*/
					oDTPicker:CustomFormat := "dd-MM-yyy"
					oDTPicker:Refresh()
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
62:
How can I add an ActiveX item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu
	LOCAL oControl

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oControl := oExMenu:Items():Add("Calendar",3):SubControl()
			oControl:ControlID := "MSCal.Calendar"
			oControl:Create()
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
61:
How can I add a separator item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu
	LOCAL oMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oMenu := oExMenu:Items():Add("Popup",2):SubMenu()
			oMenu:Add("Item 1")
			oMenu:Add("",1)
			oMenu:Add("Item 2")
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
60:
How can I add a popup or a submenu

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu
	LOCAL oMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oMenu := oExMenu:Items():Add("Popup",2):SubMenu()
			oMenu:Add("Item 1")
			oMenu:Add("Item 2")
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
59:
How can I add a new item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Items():Add("Item 1")
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
58:
How I can assign a picture or an icon to an item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oExMenu:SetProperty("HTMLPicture","pic1","c:\exontrol\images\zipdisk.gif")
		oExMenu:SetProperty("ItemHeight",2/*Button*/,34)
		oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"
		oExMenu:Items:item(10):Caption := "<img>pic1</img> <b>1</b>"
		oExMenu:Items:item(60):Caption := "T <img>1</img> <img>2</img> and so on "
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
57:
How I can assign a picture to an item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:SetProperty("HTMLPicture","pic1","c:\exontrol\images\zipdisk.gif")
		oExMenu:SetProperty("HTMLPicture","pic2","c:\exontrol\images\auction.gif")
		oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"
		oExMenu:Items:item(10):Caption := "<img>pic1</img> <b>1</b>"
		oExMenu:Items:item(60):Caption := "<img>pic2</img> <b>2</b>"
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
56:
How do I call your x-script language

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Template := "Items.ToString = `Item 1,Item 2`"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
55:
How do I change the shape of the cursor whether it hovers the control

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Cursor := "exHelp"
		oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
54:
How do I specify whether the item gets selected whether the user presses or releases the mouse

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:SelectOn := 0/*exMouseUp*/
		oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
53:
How do I change the picture or icon for the chevrons

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oExMenu:SetProperty("ScrollImage",.T.,1)
		oExMenu:SetProperty("ScrollImage",.F.,2)
		oExMenu:AllowChevron := 1/*exScroll*/
		oExMenu:Items():ToString := "Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40]),Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40]),Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40]),Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40]),Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40]),Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40]),Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40]),Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40]),Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40]),Popup[id=10](Ite" +;
		"m 1[id=20],[sep][id=30],Item 2[id=40])"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
52:
How do I specify the height for items

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:SetProperty("ItemHeight",2/*Button*/,34)
		oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
51:
How do I change the picture or icon for the chevrons

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oExMenu:ChevronImage := 1
		oExMenu:AllowChevron := -1/*exChevron*/
		oExMenu:Items():ToString := "Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40]),Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40]),Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40]),Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40]),Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40]),Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40]),Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40]),Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40]),Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40]),Popup[id=10](Ite" +;
		"m 1[id=20],[sep][id=30],Item 2[id=40])"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
50:
How do I disable chevrons

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:AllowChevron := 0/*exDefault*/
		oExMenu:Items():ToString := "Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40]),Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40]),Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40]),Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40]),Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40]),Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40]),Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40]),Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40]),Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40]),Popup[id=10](Ite" +;
		"m 1[id=20],[sep][id=30],Item 2[id=40])"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
49:
How do I allow chevrons

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:AllowChevron := 1/*exScroll*/
		oExMenu:Items():ToString := "Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40]),Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40]),Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40]),Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40]),Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40]),Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40]),Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40]),Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40]),Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40]),Popup[id=10](Ite" +;
		"m 1[id=20],[sep][id=30],Item 2[id=40])"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
48:
How do I allow chevrons

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:AllowChevron := -1/*exChevron*/
		oExMenu:Items():ToString := "Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40]),Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40]),Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40]),Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40]),Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40]),Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40]),Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40]),Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40]),Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40]),Popup[id=10](Ite" +;
		"m 1[id=20],[sep][id=30],Item 2[id=40])"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
47:
How do I show directly the drop down menu, without scrolling

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:ScrollOnDrop := 0/*exShowPopupDirect*/
		oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
46:
How can I change the visual appearance for for a top level item, when the Appearance property is Flat

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oExMenu:SetProperty("Background",2/*exSelectRootItem*/,0x1000000)
		oExMenu:Appearance := 1/*Flat*/
		oExMenu:Border := 1/*FlatBorder*/
		oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
45:
How can I change the visual appearance for an item, when the Appearance property is Button

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oExMenu:SetProperty("Background",1/*exButtonItem*/,0x1000000)
		oExMenu:Appearance := 2/*Button*/
		oExMenu:Border := 1/*FlatBorder*/
		oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
44:
Can I change the visual appearance for separator items

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oExMenu:SetProperty("Background",0/*exSeparatorItem*/,0x1000000)
		oExMenu:Items():ToString := "Popup[id=10](Item 1[id=20],[sep][id=30],Item 2[id=40])"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
43:
Can I change the forecolor for the tooltip

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:ToolTipDelay := 1
		oExMenu:ToolTipWidth := 364
		oExMenu:SetProperty("Background",66/*exToolTipForeColor*/,AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oExMenu:Items():ToString := "ToolTip [id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50])"
		oExMenu:Items:item(10):Tooltip := "Click the <b>ToolTip</b> and so the drop down menu will be shown"
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
42:
Can I change the background color for the tooltip

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:ToolTipDelay := 1
		oExMenu:ToolTipWidth := 364
		oExMenu:SetProperty("Background",65/*exToolTipBackColor*/,AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oExMenu:Items():ToString := "ToolTip [id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50])"
		oExMenu:Items:item(10):Tooltip := "Click the <b>ToolTip</b> and so the drop down menu will be shown"
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
41:
Can I change the default border of the tooltip, using your EBN files

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:ToolTipDelay := 1
		oExMenu:ToolTipWidth := 364
		oExMenu:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oExMenu:SetProperty("Background",64/*exToolTipAppearance*/,0x1000000)
		oExMenu:Items():ToString := "ToolTip [id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50])"
		oExMenu:Items:item(10):Tooltip := "Click the <b>ToolTip</b> and so the drop down menu will be shown"
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
40:
Can I change the font for the tooltip

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu
	LOCAL oStdFont

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:ToolTipDelay := 1
		oStdFont := oExMenu:ToolTipFont()
			oStdFont:Name := "Tahoma"
			oStdFont:Size := 14
		oExMenu:ToolTipWidth := 400
		oExMenu:Items():ToString := "ToolTip [id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50])"
		oExMenu:Items:item(10):Tooltip := "Click the <b>ToolTip</b> and so the drop down menu will be shown"
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
39:
I've seen that the width of the tooltip is variable. Can I make it larger

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:ToolTipWidth := 328
		oExMenu:Items():ToString := "ToolTip [id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50])"
		oExMenu:Items:item(10):Tooltip := "Click the <b>ToolTip</b> and so the drop down menu will open"
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
38:
How do I let the tooltip being displayed longer

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:ToolTipPopDelay := 10000
		oExMenu:Items():ToString := "ToolTip [id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50])"
		oExMenu:Items:item(10):Tooltip := "Click the <b>ToolTip</b> and so the drop down menu will opene"
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
37:
How do I disable showing the tooltip for all control

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:ToolTipDelay := 0
		oExMenu:Items():ToString := "No-ToolTip [id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50])"
		oExMenu:Items:item(10):Tooltip := "Click the <b>ToolTip</b> and so the drop down menu will opene"
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
36:
How do I show the tooltip quicker

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:ToolTipDelay := 1
		oExMenu:Items():ToString := "ToolTip [id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50])"
		oExMenu:Items:item(10):Tooltip := "Click the <b>ToolTip</b> and so the drop down menu will opene"
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
35:
How do I open the menu as user clicks the menu

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:OpenOnClick := 1/*exAlwaysClick*/
		oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
34:
How do I open the menu as cursor hovers the menu bar

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:OpenOnClick := 0/*exHoverMenuBar*/
		oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
33:
Can I make the menu partialy visible

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Visibility := 90
		oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
32:
How do I remove or clear the accelerator keys

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Debug := .T.
		oExMenu:Items():ToString := "Item &1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"
		oExMenu:AddAcelerator(10,49,.F.,.T.,.F.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
31:
How do I add or assign an accelerator key to an item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Debug := .T.
		oExMenu:Items():ToString := "Item &1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"
		oExMenu:AddAcelerator(10,49,.F.,.T.,.F.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
30:
How can I load the items from a file
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )


	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
29:
How can I save the items to a file
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )


	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
28:
How do I put a picture on the center of the control

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Picture := oExMenu:ExecuteTemplate("loadpicture(`c:\exontrol\images\zipdisk.gif`)")
		oExMenu:PictureDisplay := 17/*MiddleCenter*/

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
27:
How do I resize/stretch a picture on the control's background
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Picture := oExMenu:ExecuteTemplate("loadpicture(`c:\exontrol\images\zipdisk.gif`)")
		oExMenu:PictureDisplay := 49/*Stretch*/

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
26:
How do I put a picture on the control's center right bottom side
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Picture := oExMenu:ExecuteTemplate("loadpicture(`c:\exontrol\images\zipdisk.gif`)")
		oExMenu:PictureDisplay := 34/*LowerRight*/

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
25:
How do I put a picture on the control's center left bottom side
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Picture := oExMenu:ExecuteTemplate("loadpicture(`c:\exontrol\images\zipdisk.gif`)")
		oExMenu:PictureDisplay := 32/*LowerLeft*/

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
24:
How do I put a picture on the control's center top side
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Picture := oExMenu:ExecuteTemplate("loadpicture(`c:\exontrol\images\zipdisk.gif`)")
		oExMenu:PictureDisplay := 1/*UpperCenter*/

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
23:
How do I put a picture on the control's right top corner
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Picture := oExMenu:ExecuteTemplate("loadpicture(`c:\exontrol\images\zipdisk.gif`)")
		oExMenu:PictureDisplay := 2/*UpperRight*/

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
22:
How do I put a picture on the control's left top corner
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Picture := oExMenu:ExecuteTemplate("loadpicture(`c:\exontrol\images\zipdisk.gif`)")
		oExMenu:PictureDisplay := 0/*UpperLeft*/

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
21:
How do I put a picture on the control's background
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Picture := oExMenu:ExecuteTemplate("loadpicture(`c:\exontrol\images\zipdisk.gif`)")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
20:
Is there any function to display the item's identifiers

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Debug := .T.
		oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
19:
How do I find an item giving its name

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"
		oExMenu:item("Item 1"):Bold := .T.
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
18:
How do I find an item giving its identifier

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"
		oExMenu:item(10):Bold := .T.
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
17:
How do I enable or disable the control

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Enabled := .F.
		oExMenu:Items():Add("Item 1")
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
16:
How do I refresh the control
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Items():Add("Item 1")
		oExMenu:Refresh()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
15:
How do I change the color to highligth the selected item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:SetProperty("HighLightBorderColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
14:
How do I change the drop down, popup menu foreground color

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:SetProperty("PopupForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
13:
How do I change the drop down, popup menu background color

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:SetProperty("PopupBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
12:
How do I change the control's shadow color

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:SetProperty("ShadowColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
11:
How do I place the control on vertical

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:OpenMode := 1/*Horizontal*/
		oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
10:
How do I change the control's appearance
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Appearance := 2/*Button*/
		oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
9:
How do I change the control's appearance

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Appearance := 0/*Normal*/
		oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
8:
How do I change the visual appearance effect for the selected item, using EBN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oExMenu:SetProperty("SelBackColor",0x1000000)
		oExMenu:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
		oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
7:
How do I change the colors for the selected item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
		oExMenu:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
		oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
6:
How do I change the control's foreground color

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
5:
How do I change the control's background color

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 200,200,200 } )  , .F. ))

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
4:
How can I change the control's font

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Font():Name := "Tahoma"
		oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
3:
How do I change the drop down menu's border

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:Border := 1/*FlatBorder*/
		oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2:
How do I change the control's border, using your EBN files

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oExMenu:MenuBarBorder := 16777216/*0x1000000+*/
		oExMenu:Border := 16777216/*0x1000000+*/
		oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1:
How do I change the control's border

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExMenu:CLSID  := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
	oExMenu:create(,, {10,60},{610,370} )

		oExMenu:MenuBarBorder := 1/*FlatBorder*/
		oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN