17:
How can I display the caption in mirror

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

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

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

	oButton := XbpActiveXControl():new( oForm:drawingArea )
	oButton:CLSID  := "Exontrol.Button.1" /*{F3A2203A-6B28-4A74-9DC9-4065D1C0A29D}*/
	oButton:create(,, {10,60},{610,370} )

		oButton:Alignment := 1/*exCenter*/
		oButton:VAlignment := 1/*exMiddle*/
		oButton:Caption := "Command"
		oButton:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
		oButton:Rotate := 16/*exHTMLMirror*/

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
16:
How can I display vertically the caption

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

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

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

	oButton := XbpActiveXControl():new( oForm:drawingArea )
	oButton:CLSID  := "Exontrol.Button.1" /*{F3A2203A-6B28-4A74-9DC9-4065D1C0A29D}*/
	oButton:create(,, {10,60},{610,370} )

		oButton:Alignment := 1/*exCenter*/
		oButton:VAlignment := 1/*exMiddle*/
		oButton:Caption := "Command"
		oButton:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
		oButton:Rotate := 1/*exHTMLVertical*/

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
15:
How can I display a picture on the button's face to be scaled automatically once the button is resized

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

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

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

	oButton := XbpActiveXControl():new( oForm:drawingArea )
	oButton:CLSID  := "Exontrol.Button.1" /*{F3A2203A-6B28-4A74-9DC9-4065D1C0A29D}*/
	oButton:create(,, {10,60},{610,370} )

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

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
14:
How can I display an & ( ampersand ) in the button's caption

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

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

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

	oButton := XbpActiveXControl():new( oForm:drawingArea )
	oButton:CLSID  := "Exontrol.Button.1" /*{F3A2203A-6B28-4A74-9DC9-4065D1C0A29D}*/
	oButton:create(,, {10,60},{610,370} )

		oButton:Caption := "Briana && Iasmina && Rares"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
13:
How can I define my own visual appearance / style for my button

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

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

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

	oButton := XbpActiveXControl():new( oForm:drawingArea )
	oButton:CLSID  := "Exontrol.Button.1" /*{F3A2203A-6B28-4A74-9DC9-4065D1C0A29D}*/
	oButton:create(,, {10,60},{610,370} )

		oButton:Style := -1/*exCustom1*/
		oButton:AllowHotState := .T.
		oButton:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
		oButton:Skin(0/*exNormal*/,"c:\exontrol\images\normal.ebn")
		oButton:Skin(1/*exPushed*/,"c:\exontrol\images\pushed.ebn")
		oButton:Skin(2/*exHot*/,"c:\exontrol\images\hot.ebn")
		oButton:Skin(3/*exDisabled*/,"c:\exontrol\images\border.ebn")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
12:
How can I display a percent bar over the control

PROCEDURE OnClick(oButton)
	oButton:SetProperty("BackgroundExtValue",5/*exIndexExt5*/,2/*exClientExt*/,"25%")
	oButton:SetProperty("BackgroundExtValue",5/*exIndexExt5*/,4/*exTextExt*/,oButton:BackgroundExtValue(5/*exIndexExt5*/,2/*exClientExt*/))
RETURN

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

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

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

	oButton := XbpActiveXControl():new( oForm:drawingArea )
	oButton:CLSID  := "Exontrol.Button.1" /*{F3A2203A-6B28-4A74-9DC9-4065D1C0A29D}*/
	oButton:create(,, {10,60},{610,370} )

		oButton:Click := {|| OnClick(oButton)} /*Occurs when the user presses and then releases the left mouse button over the control.*/

		oButton:Caption := "Command"
		oButton:VAlignment := 0/*exTop*/
		oButton:BackgroundExt := "bottom[4],left[4],right[4],bottom[16,pattern=0x000,frame=RGB(0,0,0)](left[50%,back=RGB(0,255,0),text=`<font ;6><sha ;;0>50%`,align=0x11,pattern=0x006,patterncolor=RGB(0,128,0),frame=RGB(0,128,0)])"
		oButton:SetProperty("BackgroundExtValue",5/*exIndexExt5*/,2/*exClientExt*/,"75%")
		oButton:SetProperty("BackgroundExtValue",5/*exIndexExt5*/,4/*exTextExt*/,oButton:BackgroundExtValue(5/*exIndexExt5*/,2/*exClientExt*/))

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
11:
Is it possible to display an additional caption 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 oButton

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

	oButton := XbpActiveXControl():new( oForm:drawingArea )
	oButton:CLSID  := "Exontrol.Button.1" /*{F3A2203A-6B28-4A74-9DC9-4065D1C0A29D}*/
	oButton:create(,, {10,60},{610,370} )

		oButton:BackgroundExt := "root[text=`<font ;6>additional`,align=0x21]"
		oButton:Caption := "Command"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
10:
How can I display a pattern over the button

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

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

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

	oButton := XbpActiveXControl():new( oForm:drawingArea )
	oButton:CLSID  := "Exontrol.Button.1" /*{F3A2203A-6B28-4A74-9DC9-4065D1C0A29D}*/
	oButton:create(,, {10,60},{610,370} )

		oButton:BackgroundExt := "root[pattern=0x006,patterncolor=RGB(128,128,128)]"
		oButton:Caption := "Command"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
9:
Does your control support subscript or superscript, in HTML captions

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

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

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

	oButton := XbpActiveXControl():new( oForm:drawingArea )
	oButton:CLSID  := "Exontrol.Button.1" /*{F3A2203A-6B28-4A74-9DC9-4065D1C0A29D}*/
	oButton:create(,, {10,60},{610,370} )

		oButton:Caption := "Text with <font ;7><off 6><sha ;;0>subscript</off></font></sha> and <font ;7><off -6><sha ;;0>superscript</off></font></sha> support"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
8:
How can I change the caption

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

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

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

	oButton := XbpActiveXControl():new( oForm:drawingArea )
	oButton:CLSID  := "Exontrol.Button.1" /*{F3A2203A-6B28-4A74-9DC9-4065D1C0A29D}*/
	oButton:create(,, {10,60},{610,370} )

		oButton:Caption := "Mühle"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
7:
Is it possible to specify the control's background color when disabled

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

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

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

	oButton := XbpActiveXControl():new( oForm:drawingArea )
	oButton:CLSID  := "Exontrol.Button.1" /*{F3A2203A-6B28-4A74-9DC9-4065D1C0A29D}*/
	oButton:create(,, {10,60},{610,370} )

		oButton:Caption := "<fgcolor=808080>Disabled"
		oButton:Enabled := .F.
		oButton:SetProperty("ForeColorState",3/*exDisabled*/,AutomationTranslateColor( GraMakeRGBColor  ( { 0,255,0 } )  , .F. ))

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

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

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

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

	oButton := XbpActiveXControl():new( oForm:drawingArea )
	oButton:CLSID  := "Exontrol.Button.1" /*{F3A2203A-6B28-4A74-9DC9-4065D1C0A29D}*/
	oButton:create(,, {10,60},{610,370} )

		oButton:Caption := "just the button's caption"
		oButton:Enabled := .F.

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
5:
How do I put/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 oButton

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

	oButton := XbpActiveXControl():new( oForm:drawingArea )
	oButton:CLSID  := "Exontrol.Button.1" /*{F3A2203A-6B28-4A74-9DC9-4065D1C0A29D}*/
	oButton:create(,, {10,60},{610,370} )

		oButton:Picture := oButton: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
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 oButton
	LOCAL f

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

	oButton := XbpActiveXControl():new( oForm:drawingArea )
	oButton:CLSID  := "Exontrol.Button.1" /*{F3A2203A-6B28-4A74-9DC9-4065D1C0A29D}*/
	oButton:create(,, {10,60},{610,370} )

		f := CreateObject("StdFont")
			f:Name := "Verdana"
			f:Size := 12
		oButton:Font := f
		oButton:Caption := "just the button's caption"

	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 control's foreground color

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

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

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

	oButton := XbpActiveXControl():new( oForm:drawingArea )
	oButton:CLSID  := "Exontrol.Button.1" /*{F3A2203A-6B28-4A74-9DC9-4065D1C0A29D}*/
	oButton:create(,, {10,60},{610,370} )

		oButton:Caption := "<font ;16><fgcolor=FF0000>just</fgcolor></font> the button's caption"

	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 foreground color

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

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

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

	oButton := XbpActiveXControl():new( oForm:drawingArea )
	oButton:CLSID  := "Exontrol.Button.1" /*{F3A2203A-6B28-4A74-9DC9-4065D1C0A29D}*/
	oButton:create(,, {10,60},{610,370} )

		oButton:SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oButton:Caption := "just the button's caption"

	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 background color

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

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

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

	oButton := XbpActiveXControl():new( oForm:drawingArea )
	oButton:CLSID  := "Exontrol.Button.1" /*{F3A2203A-6B28-4A74-9DC9-4065D1C0A29D}*/
	oButton:create(,, {10,60},{610,370} )

		oButton:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oButton:BorderWidth := 8
		oButton:BorderHeight := 8

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