excalc - sample code

How can I enlarge the control's edit area?

VBA (MS Access, Excell...)

With Calc1
	.EditHeight = 32
	.ButtonHeight = 32
	.ButtonWidth = 32
End With

VB6

With Calc1
	.EditHeight = 32
	.ButtonHeight = 32
	.ButtonWidth = 32
End With

VB.NET

With Excalc1
	.EditHeight = 32
	.ButtonHeight = 32
	.ButtonWidth = 32
End With

VB.NET for /COM

With AxCalc1
	.EditHeight = 32
	.ButtonHeight = 32
	.ButtonWidth = 32
End With

C++

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCLib' for the library: 'ExCalc 1.0 Control Library'

	#import <ExCalc.dll>
	using namespace EXCALCLib;
*/
EXCALCLib::ICalcPtr spCalc1 = GetDlgItem(IDC_CALC1)->GetControlUnknown();
spCalc1->PutEditHeight(32);
spCalc1->PutButtonHeight(32);
spCalc1->PutButtonWidth(32);

C++ Builder

Calc1->EditHeight = 32;
Calc1->ButtonHeight = 32;
Calc1->ButtonWidth = 32;

C#

excalc1.EditHeight = 32;
excalc1.ButtonHeight = 32;
excalc1.ButtonWidth = 32;

JScript/JavaScript

<BODY onload="Init()">
<OBJECT CLASSID="clsid:74B7322B-D54B-47AD-A891-AC60B02EE192" id="Calc1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	Calc1.EditHeight = 32;
	Calc1.ButtonHeight = 32;
	Calc1.ButtonWidth = 32;
}
</SCRIPT>
</BODY>

VBScript

<BODY onload="Init()">
<OBJECT CLASSID="clsid:74B7322B-D54B-47AD-A891-AC60B02EE192" id="Calc1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Calc1
		.EditHeight = 32
		.ButtonHeight = 32
		.ButtonWidth = 32
	End With
End Function
</SCRIPT>
</BODY>

C# for /COM

axCalc1.EditHeight = 32;
axCalc1.ButtonHeight = 32;
axCalc1.ButtonWidth = 32;

X++ (Dynamics Ax 2009)

public void init()
{
	;

	super();

	excalc1.EditHeight(32);
	excalc1.ButtonHeight(32);
	excalc1.ButtonWidth(32);
}

Delphi 8 (.NET only)

with AxCalc1 do
begin
	EditHeight := 32;
	ButtonHeight := 32;
	ButtonWidth := 32;
end

Delphi (standard)

with Calc1 do
begin
	EditHeight := 32;
	ButtonHeight := 32;
	ButtonWidth := 32;
end

VFP

with thisform.Calc1
	.EditHeight = 32
	.ButtonHeight = 32
	.ButtonWidth = 32
endwith

dBASE Plus

local oCalc

oCalc = form.EXCALCACTIVEXCONTROL1.nativeObject
oCalc.EditHeight = 32
oCalc.ButtonHeight = 32
oCalc.ButtonWidth = 32

XBasic (Alpha Five)

Dim oCalc as P

oCalc = topparent:CONTROL_ACTIVEX1.activex
oCalc.EditHeight = 32
oCalc.ButtonHeight = 32
oCalc.ButtonWidth = 32

Visual Objects


oDCOCX_Exontrol1:EditHeight := 32
oDCOCX_Exontrol1:ButtonHeight := 32
oDCOCX_Exontrol1:ButtonWidth := 32

PowerBuilder

OleObject oCalc

oCalc = ole_1.Object
oCalc.EditHeight = 32
oCalc.ButtonHeight = 32
oCalc.ButtonWidth = 32

Visual DataFlex

Procedure OnCreate
	Forward Send OnCreate
	Set ComEditHeight to 32
	Set ComButtonHeight to 32
	Set ComButtonWidth to 32
End_Procedure

XBase++

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

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

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

	oCalc := XbpActiveXControl():new( oForm:drawingArea )
	oCalc:CLSID  := "Exontrol.Calc.1" /*{74B7322B-D54B-47AD-A891-AC60B02EE192}*/
	oCalc:create(,, {10,60},{610,370} )

		oCalc:EditHeight := 32
		oCalc:ButtonHeight := 32
		oCalc:ButtonWidth := 32

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
Copyright 1999-2017 Exontrol. All rights reserved.