78
Is it possible to change the line's height

axCalcEdit1.MultiLine = true;
axCalcEdit1.Text = "(1+6.25)/4*6/3";
axCalcEdit1.InsertText("(2+6.25)/4*6/3\\r\\n",1);
axCalcEdit1.InsertText("(3+6.25)/4*6/3\\r\\n",1);
axCalcEdit1.InsertText("(4+6.25)/4*6/3\\r\\n",1);
axCalcEdit1.InsertText("Total",null);
axCalcEdit1.LineHeight = "value + 8 * dpi";
axCalcEdit1.DrawGridLines = true;

77
How do I put a picture on the control's background

(axCalcEdit1.GetOcx() as EXCALCEDITLib.CalcEdit).Picture = (axCalcEdit1.ExecuteTemplate("loadpicture(`c:\\exontrol\\images\\zipdisk.gif`)") as stdole.IPictureDisp);
axCalcEdit1.PictureDisplay = EXCALCEDITLib.PictureDisplayEnum.exUpperLeft;
axCalcEdit1.MultiLine = true;
axCalcEdit1.Text = "(1+6.25)/4*6/3";
axCalcEdit1.InsertText("\\r\\n",1);
axCalcEdit1.InsertText("\\r\\n",1);
axCalcEdit1.InsertText("\\r\\n",1);
System.Diagnostics.Debug.Print( "Expression: " );
System.Diagnostics.Debug.Print( axCalcEdit1.Text );
System.Diagnostics.Debug.Print( "Result: " );
System.Diagnostics.Debug.Print( axCalcEdit1.get_Result(null).ToString() );

76
How do I get the numbers only, with no Total fields (method 2)

axCalcEdit1.MultiLine = true;
axCalcEdit1.FormatResult = "<fgcolor=808080><r> = %%";
axCalcEdit1.InsertText("100 * 200",null);
axCalcEdit1.InsertText("300 * 400 * 1.5",null);
axCalcEdit1.InsertText("200 + ( 400 * 1.5 + 300 / 1.19)",null);
axCalcEdit1.InsertText("Total",null);
System.Diagnostics.Debug.Print( axCalcEdit1.ExecuteTemplate("FormatABC(\"lower(A) replace `total` with ``\", Text)").ToString() );

75
How do I get the numbers only, with no Total fields (method 1)

axCalcEdit1.MultiLine = true;
axCalcEdit1.FormatResult = "<fgcolor=808080><r> = %%";
axCalcEdit1.InsertText("100 * 200",null);
axCalcEdit1.InsertText("300 * 400 * 1.5",null);
axCalcEdit1.InsertText("200 + ( 400 * 1.5 + 300 / 1.19)",null);
axCalcEdit1.InsertText("Total",null);
System.Diagnostics.Debug.Print( axCalcEdit1.FormatABC("lower(A) replace `total` with ``",axCalcEdit1.Text,null,null).ToString() );

74
How do I customize the format to display the result (right,local,2 decimals,less,font)

axCalcEdit1.MultiLine = true;
axCalcEdit1.LineHeight = "value + 8 * dpi";
axCalcEdit1.FormatLocal = "( value < 10000 ? `<fgcolor=000000><b><font ;16>` : ``) + (value format `2`)";
axCalcEdit1.FormatResult = "<fgcolor=808080><r> = %l%";
axCalcEdit1.InsertText("100 * 200",null);
axCalcEdit1.InsertText("300 * 400 * 1.5",null);
axCalcEdit1.InsertText("200 + ( 400 * 1.5 + 300 / 1.19)",null);

73
How do I customize the format to display the result (right,local,2 decimals,greater,color)

axCalcEdit1.MultiLine = true;
axCalcEdit1.FormatLocal = "( value > 10000 ? `<fgcolor=FF0000><b>` : ``) + (value format `2`)";
axCalcEdit1.FormatResult = "<fgcolor=808080><r> = %l%";
axCalcEdit1.InsertText("100 * 200",null);
axCalcEdit1.InsertText("300 * 400 * 1.5",null);
axCalcEdit1.InsertText("200 + ( 400 * 1.5 + 300 / 1.19)",null);

72
How do I customize the format to display the result (right,local,all decimals)

axCalcEdit1.MultiLine = true;
axCalcEdit1.FormatLocal = "value";
axCalcEdit1.FormatResult = "<fgcolor=808080><r> = %l%";
axCalcEdit1.InsertText("100 * 200",null);
axCalcEdit1.InsertText("300 * 400 * 1.5",null);
axCalcEdit1.InsertText("200 + ( 400 * 1.5 + 300 / 1.19)",null);

71
How do I customize the format to display the result (right,local,2 decimals)

axCalcEdit1.MultiLine = true;
axCalcEdit1.FormatLocal = "value format `2`";
axCalcEdit1.FormatResult = "<fgcolor=808080><r> = %l%";
axCalcEdit1.InsertText("100 * 200",null);
axCalcEdit1.InsertText("300 * 400 * 1.5",null);
axCalcEdit1.InsertText("200 + ( 400 * 1.5 + 300 / 1.19)",null);

70
How do I customize the format to display the result (right,local,curency)

axCalcEdit1.MultiLine = true;
axCalcEdit1.FormatLocal = "currency(value)";
axCalcEdit1.FormatResult = "<fgcolor=808080><r> = %l%";
axCalcEdit1.InsertText("100 * 200",null);
axCalcEdit1.InsertText("300 * 400 * 1.5",null);
axCalcEdit1.InsertText("200 + ( 400 * 1.5 + 300 / 1.19)",null);

69
How do I customize the format to display the result (right,local)

axCalcEdit1.MultiLine = true;
axCalcEdit1.FormatResult = "<fgcolor=808080><r> = %l%";
axCalcEdit1.InsertText("100 * 200",null);
axCalcEdit1.InsertText("300 * 400 * 1.5",null);
axCalcEdit1.InsertText("200 + ( 400 * 1.5 + 300 / 1.19)",null);

68
How do I customize the format to display the result (right)

axCalcEdit1.MultiLine = true;
axCalcEdit1.FormatResult = "<fgcolor=808080><r> = %%";
axCalcEdit1.InsertText("100 * 200",null);
axCalcEdit1.InsertText("300 * 400 * 1.5",null);
axCalcEdit1.InsertText("200 + ( 400 * 1.5 + 300 / 1.19)",null);

67
How do I customize the format to display the result (default)

axCalcEdit1.MultiLine = true;
axCalcEdit1.InsertText("100 * 200",null);
axCalcEdit1.InsertText("300 * 400 * 1.5",null);
axCalcEdit1.InsertText("200 + ( 400 * 1.5 + 300 / 1.19)",null);

66
How can I force a line to be there all the time, so user can not delete it, for instance Total

axCalcEdit1.MultiLine = true;
axCalcEdit1.InsertLockedText("Total",null);
axCalcEdit1.InsertText("100",null);
axCalcEdit1.InsertText("200",null);
axCalcEdit1.InsertText("300",null);

65
Is it possible to get the value of specified variable

axCalcEdit1.MultiLine = true;
axCalcEdit1.InsertText("100",null);
axCalcEdit1.InsertText("200",null);
axCalcEdit1.InsertText("300",null);
axCalcEdit1.InsertText("TVA = Total * 0.19",null);
axCalcEdit1.InsertText("Total",null);
System.Diagnostics.Debug.Print( "The TVA is: " );
System.Diagnostics.Debug.Print( axCalcEdit1.get_Variable("TVA").ToString() );

64
How do I get the total

axCalcEdit1.MultiLine = true;
axCalcEdit1.InsertText("100",null);
axCalcEdit1.InsertText("200",null);
axCalcEdit1.InsertText("300",null);
axCalcEdit1.InsertText("Total",null);
System.Diagnostics.Debug.Print( "The total is: " );
System.Diagnostics.Debug.Print( axCalcEdit1.get_Variable("Total").ToString() );

63
How do I get the easter date

axCalcEdit1.MultiLine = true;
axCalcEdit1.CalcType = EXCALCEDITLib.CalcTypeEnum.exCalcIncludeAll;
axCalcEdit1.ClearWildFormats();
axCalcEdit1.FormatResult = "<r><fgcolor=008000><b>(%%)";
axCalcEdit1.AllowComments = "<fgcolor=008000>//";
axCalcEdit1.AddWildFormat("*=*<fgcolor=008000>//*");
axCalcEdit1.AddWildFormat("<fgcolor=808080>V*=*");
axCalcEdit1.AddWildFormat("<b>EasterSundayDay*=*");
axCalcEdit1.BackColorLockedLine = Color.FromArgb(0,0,0);
axCalcEdit1.ForeColorLockedLine = Color.FromArgb(0,0,0);
axCalcEdit1.Text = "Year = 2018 // change here the year, to get the Easter Sunday for giving year";
axCalcEdit1.InsertLockedText("V1 = (((255 - 11 * (Year mod 19)) - 21) mod 30)",null);
axCalcEdit1.InsertLockedText("V2 = ((V1 + 21) + (V1 > 48 ? -1 : 0) + 6 - ((Year + int(Year / 4)) + V1 + (V1 > 48 ? -1 : 0) + 1) mod 7)",null);
axCalcEdit1.InsertLockedText("EasterSundayDay = date(dateS('3/1/' + Year)  + V2)",null);
System.Diagnostics.Debug.Print( "Easter Sunday Day is " );
System.Diagnostics.Debug.Print( axCalcEdit1.get_Variable("EasterSundayDay").ToString() );
System.Diagnostics.Debug.Print( " for year " );
System.Diagnostics.Debug.Print( axCalcEdit1.get_Variable("Year").ToString() );

62
I've got a red line while I type into the control. How can I disable that (sample 2)

axCalcEdit1.AllowFormatInvalidOnTyping = false;
axCalcEdit1.MultiLine = true;
axCalcEdit1.Text = "100 + 200(invalid)";

61
I've got a red line while I type into the control. How can I disable that (sample 1)

axCalcEdit1.FormatInvalid = "";
axCalcEdit1.Text = "100 + 200(invalid)";

60
How do I specify the color to show the locked lines

axCalcEdit1.MultiLine = true;
axCalcEdit1.AllowVariables = "=";
axCalcEdit1.DrawGridLines = true;
axCalcEdit1.LineHeight = "value + 8 * dpi";
axCalcEdit1.GridLineColor = Color.FromArgb(196,196,196);
axCalcEdit1.FormatResult = "<r>[=%l%]";
axCalcEdit1.FormatLocal = "currency(value)";
axCalcEdit1.FormatTotalResult = "<r><b> <fgcolor=FFFFFF>= %l%</b>";
axCalcEdit1.BackColorLockedLine = Color.FromArgb(0,0,1);
axCalcEdit1.ForeColorLockedLine = Color.FromArgb(255,255,255);
axCalcEdit1.InsertText("100",null);
axCalcEdit1.InsertText("200",null);
axCalcEdit1.InsertLockedText("VAT = Total * 0.20",null);
axCalcEdit1.InsertLockedText("Total",null);

59
Can I remove the colors that indicates locked lines

axCalcEdit1.MultiLine = true;
axCalcEdit1.AllowVariables = "=";
axCalcEdit1.DrawGridLines = true;
axCalcEdit1.LineHeight = "value + 8 * dpi";
axCalcEdit1.GridLineColor = Color.FromArgb(196,196,196);
axCalcEdit1.FormatResult = "<r><fgcolor=808080>[=%l%]";
axCalcEdit1.FormatLocal = "currency(value)";
axCalcEdit1.FormatTotalResult = "<r><b> = %l%</b>";
axCalcEdit1.BackColorLockedLine = Color.FromArgb(0,0,0);
axCalcEdit1.ForeColorLockedLine = Color.FromArgb(0,0,0);
axCalcEdit1.InsertText("100",null);
axCalcEdit1.InsertText("200",null);
axCalcEdit1.InsertLockedText("VAT = Total * 0.20",null);
axCalcEdit1.InsertLockedText("Total",null);

58
Can I add lines to the control, so the user can not remove/delete them ( locked lines )

axCalcEdit1.MultiLine = true;
axCalcEdit1.CalcType = EXCALCEDITLib.CalcTypeEnum.exCalcIncludeAll;
axCalcEdit1.AllowVariables = "=";
axCalcEdit1.DrawGridLines = true;
axCalcEdit1.LineHeight = "value + 8 * dpi";
axCalcEdit1.GridLineColor = Color.FromArgb(196,196,196);
axCalcEdit1.FormatResult = "<r><fgcolor=808080>[=%l%]";
axCalcEdit1.FormatLocal = "currency(value)";
axCalcEdit1.FormatTotalResult = "<r><b> = %l%</b>";
axCalcEdit1.Text = "1000";
axCalcEdit1.InsertText("2000",null);
axCalcEdit1.InsertLockedText("Commission = Total * 0.05 + (Total ? 2.95 : 0)",null);
axCalcEdit1.InsertLockedText("Total",null);

57
Is it possible to highlight a specified line

axCalcEdit1.MultiLine = true;
axCalcEdit1.AllowVariables = "=";
axCalcEdit1.DrawGridLines = true;
axCalcEdit1.LineHeight = "value + 8 * dpi";
axCalcEdit1.GridLineColor = Color.FromArgb(196,196,196);
axCalcEdit1.FormatResult = "<r><fgcolor=808080>[=%l%]";
axCalcEdit1.FormatLocal = "currency(value)";
axCalcEdit1.FormatTotalResult = "<r><b> = %l%</b>";
axCalcEdit1.AddWildFormat("<fgcolor=00FF00>*<b>Commission</b>*=*");
axCalcEdit1.Text = "100.50 + 123";
axCalcEdit1.InsertText("200 + 20/5",null);
axCalcEdit1.InsertText("300 + 3 * 15",null);
axCalcEdit1.InsertText("400 + 200 * (10 + 12/45)",null);
axCalcEdit1.InsertText("50 * 45",null);
axCalcEdit1.InsertText("VAT = Total * 0.19",null);
axCalcEdit1.InsertText("NET = Total - VAT",null);
axCalcEdit1.InsertText("Monthly = Total / 12",null);
axCalcEdit1.InsertText("Commission = Total * 0.05 + 2.95",null);
axCalcEdit1.InsertText("Total",null);

56
Is it possible to display the result as currency

axCalcEdit1.MultiLine = true;
axCalcEdit1.AllowVariables = "=";
axCalcEdit1.DrawGridLines = true;
axCalcEdit1.LineHeight = "value + 8 * dpi";
axCalcEdit1.GridLineColor = Color.FromArgb(196,196,196);
axCalcEdit1.FormatLocal = "currency(value)";
axCalcEdit1.FormatTotalResult = "<r><b> = %l%</b>";
axCalcEdit1.BackColorTotal = Color.FromArgb(240,240,240);
axCalcEdit1.Text = "100.50";
axCalcEdit1.InsertText("200",null);
axCalcEdit1.InsertText("300",null);
axCalcEdit1.InsertText("400",null);
axCalcEdit1.InsertText("VAT = Total * 0.19",null);
axCalcEdit1.InsertText("NET = Total - VAT",null);
axCalcEdit1.InsertText("Total",null);

55
Is it possible to display the result with no decimals

axCalcEdit1.MultiLine = true;
axCalcEdit1.AllowVariables = "=";
axCalcEdit1.DrawGridLines = true;
axCalcEdit1.LineHeight = "value + 8 * dpi";
axCalcEdit1.GridLineColor = Color.FromArgb(196,196,196);
axCalcEdit1.FormatLocal = "value format `0`";
axCalcEdit1.FormatTotalResult = "<r><b> = %l%</b>";
axCalcEdit1.BackColorTotal = Color.FromArgb(240,240,240);
axCalcEdit1.Text = "100.50";
axCalcEdit1.InsertText("200",null);
axCalcEdit1.InsertText("300",null);
axCalcEdit1.InsertText("400",null);
axCalcEdit1.InsertText("VAT = Total * 0.19",null);
axCalcEdit1.InsertText("NET = Total - VAT",null);
axCalcEdit1.InsertText("Total",null);

54
Is it possible to display the result exactly how it is defined in the control panel

axCalcEdit1.MultiLine = true;
axCalcEdit1.AllowVariables = "=";
axCalcEdit1.DrawGridLines = true;
axCalcEdit1.LineHeight = "value + 8 * dpi";
axCalcEdit1.GridLineColor = Color.FromArgb(196,196,196);
axCalcEdit1.FormatLocal = "value format ``";
axCalcEdit1.FormatTotalResult = "<r><b> = %l%</b>";
axCalcEdit1.BackColorTotal = Color.FromArgb(240,240,240);
axCalcEdit1.Text = "100.50";
axCalcEdit1.InsertText("200",null);
axCalcEdit1.InsertText("300",null);
axCalcEdit1.InsertText("400",null);
axCalcEdit1.InsertText("VAT = Total * 0.19",null);
axCalcEdit1.InsertText("NET = Total - VAT",null);
axCalcEdit1.InsertText("Total",null);

53
How can I count the lines

axCalcEdit1.MultiLine = true;
axCalcEdit1.AllowCount = "count";
axCalcEdit1.AllowSubCount = "subcount";
axCalcEdit1.DrawGridLines = true;
axCalcEdit1.LineHeight = "value + 8 * dpi";
axCalcEdit1.GridLineColor = Color.FromArgb(196,196,196);
axCalcEdit1.InsertText("100",null);
axCalcEdit1.InsertText("200",null);
axCalcEdit1.InsertText("SubCount",null);
axCalcEdit1.InsertText("300",null);
axCalcEdit1.InsertText("400",null);
axCalcEdit1.InsertText("500",null);
axCalcEdit1.InsertText("SubCount",null);
axCalcEdit1.InsertText("Count",null);

52
How can I compute the average
axCalcEdit1.MultiLine = true;
axCalcEdit1.AllowVariables = "=";
axCalcEdit1.DrawGridLines = true;
axCalcEdit1.LineHeight = "value + 8 * dpi";
axCalcEdit1.GridLineColor = Color.FromArgb(196,196,196);
axCalcEdit1.FormatTotalResult = "<r><b> = %l%</b>";
axCalcEdit1.BackColorTotal = Color.FromArgb(240,240,240);
axCalcEdit1.Text = "Average = Total / Count";
axCalcEdit1.InsertText("100",null);
axCalcEdit1.InsertText("200",null);
axCalcEdit1.InsertText("300",null);
axCalcEdit1.InsertText("400",null);
axCalcEdit1.InsertText("VAT = Total * 0.19",null);
axCalcEdit1.InsertText("NET = Total - VAT",null);
axCalcEdit1.InsertText("Total",null);

51
Variables or Computed Fields

axCalcEdit1.MultiLine = true;
axCalcEdit1.AllowVariables = "=";
axCalcEdit1.DrawGridLines = true;
axCalcEdit1.LineHeight = "value + 8 * dpi";
axCalcEdit1.GridLineColor = Color.FromArgb(196,196,196);
axCalcEdit1.FormatTotalResult = "<r><b> = %l%</b>";
axCalcEdit1.BackColorTotal = Color.FromArgb(240,240,240);
axCalcEdit1.Text = "100";
axCalcEdit1.InsertText("200",null);
axCalcEdit1.InsertText("300",null);
axCalcEdit1.InsertText("400",null);
axCalcEdit1.InsertText("VAT = Total * 0.19",null);
axCalcEdit1.InsertText("NET = Total - VAT",null);
axCalcEdit1.InsertText("Total",null);

50
I have noticed that definition of the variable is shown in italics. Can I change that

axCalcEdit1.MultiLine = true;
axCalcEdit1.AllowVariables = "=";
axCalcEdit1.ClearWildFormats();
axCalcEdit1.AddWildFormat("<b>*=*");
axCalcEdit1.Text = "A = 400";
axCalcEdit1.InsertText("",null);
axCalcEdit1.InsertText("B = A + 0.22",null);
axCalcEdit1.InsertText("A + B",null);
axCalcEdit1.InsertText("B = B * .19",null);
axCalcEdit1.InsertText("A + B",null);

49
I have noticed that definition of the variable is shown in italics. Can I remove that

axCalcEdit1.MultiLine = true;
axCalcEdit1.AllowVariables = "=";
axCalcEdit1.ClearWildFormats();
axCalcEdit1.Text = "A = 300";
axCalcEdit1.InsertText("",null);
axCalcEdit1.InsertText("B = A + 0.22",null);
axCalcEdit1.InsertText("A + B",null);
axCalcEdit1.InsertText("B = B * .19",null);
axCalcEdit1.InsertText("A + B",null);

48
Can I define variables (sample 2)

axCalcEdit1.MultiLine = true;
axCalcEdit1.AllowVariables = "is";
axCalcEdit1.ClearWildFormats();
axCalcEdit1.AddWildFormat("<b>*is*");
axCalcEdit1.Text = "A is 200";
axCalcEdit1.InsertText("",null);
axCalcEdit1.InsertText("B is A + 0.22",null);
axCalcEdit1.InsertText("A + B",null);
axCalcEdit1.InsertText("B is B * .19",null);
axCalcEdit1.InsertText("A + B",null);

47
Can I define variables (sample 1)

axCalcEdit1.MultiLine = true;
axCalcEdit1.AllowVariables = "=";
axCalcEdit1.Text = "A = 100.22";
axCalcEdit1.InsertText("",null);
axCalcEdit1.InsertText("B = A + 0.22",null);
axCalcEdit1.InsertText("A + B",null);
axCalcEdit1.InsertText("B = B * .19",null);
axCalcEdit1.InsertText("A + B",null);

46
Comments and Prefixes

axCalcEdit1.MultiLine = true;
axCalcEdit1.AllowPrefixes = "<fgcolor=808080>:</fgcolor>";
axCalcEdit1.AllowComments = "<fgcolor=008080>'</fgcolor>";
axCalcEdit1.Text = "Field A: 100 ' this is the field A";
axCalcEdit1.InsertText("Field B: 200 ' this is the field B",null);
axCalcEdit1.InsertText("Total",null);

45
Can I display something at the start of each line

axCalcEdit1.MultiLine = true;
axCalcEdit1.AllowPrefixes = "<b>:</b>";
axCalcEdit1.Text = "Field A: 100";
axCalcEdit1.InsertText("Field B: 200",null);
axCalcEdit1.InsertText("Total",null);

44
I can not use TAB key. Is it possible
axCalcEdit1.UseTabKey = true;

43
Does your control support comments

axCalcEdit1.MultiLine = true;
axCalcEdit1.CalcType = EXCALCEDITLib.CalcTypeEnum.exCalcIncludeAll;
axCalcEdit1.AllowComments = "<fgcolor=008080>//</fgcolor>";
axCalcEdit1.Text = "104 mod 51 // modulo function";
axCalcEdit1.InsertText("int(104/51)  // int function",null);
axCalcEdit1.InsertText("51 * int(104/51) + (104 mod 51)  // check",null);

42
Can I use the modulo function ( rest )

axCalcEdit1.MultiLine = true;
axCalcEdit1.CalcType = EXCALCEDITLib.CalcTypeEnum.exCalcIncludeAll;
axCalcEdit1.Text = "104 mod 51";
axCalcEdit1.InsertText("int(104/51)",null);
axCalcEdit1.InsertText("51 * int(104/51) + (104 mod 51)",null);

41
Can I use acos function

axCalcEdit1.CalcType = EXCALCEDITLib.CalcTypeEnum.exCalcIncludeAll;
axCalcEdit1.Text = "acos(cos(1))";

40
Can I use asin function

axCalcEdit1.CalcType = EXCALCEDITLib.CalcTypeEnum.exCalcIncludeAll;
axCalcEdit1.Text = "asin(sin(1))";

39
Can I use cos function

axCalcEdit1.CalcType = EXCALCEDITLib.CalcTypeEnum.exCalcIncludeAll;
axCalcEdit1.Text = "cos(1)";

38
Can I use sin function

axCalcEdit1.CalcType = EXCALCEDITLib.CalcTypeEnum.exCalcIncludeAll;
axCalcEdit1.Text = "sin(1)";

37
Can I use abs function (absolute part of the number)

axCalcEdit1.CalcType = EXCALCEDITLib.CalcTypeEnum.exCalcIncludeAll;
axCalcEdit1.Text = "abs(-100.99)";

36
Can I use round function

axCalcEdit1.CalcType = EXCALCEDITLib.CalcTypeEnum.exCalcIncludeAll;
axCalcEdit1.Text = "round(100.99)";

35
Can I use int function (integer part of a number)

axCalcEdit1.CalcType = EXCALCEDITLib.CalcTypeEnum.exCalcIncludeAll;
axCalcEdit1.Text = "int(100.99)";

34
Can I use sqrt function (square root of a number)

axCalcEdit1.CalcType = EXCALCEDITLib.CalcTypeEnum.exCalcIncludeAll;
axCalcEdit1.Text = "sqrt(100)";

33
How can I show invalid lines with a larger font

axCalcEdit1.MultiLine = true;
axCalcEdit1.LineHeight = "value + 8 *dpi";
axCalcEdit1.DrawGridLines = true;
axCalcEdit1.FormatInvalid = "<u><font ;12> </font></u>";
axCalcEdit1.InsertText("100",null);
axCalcEdit1.InsertText("k200",null);
axCalcEdit1.InsertText("300",null);

32
I've noticed that while I type the text is shown in red. How can I change that

axCalcEdit1.FormatInvalid = "";
axCalcEdit1.Text = "100 * 200";

31
Can I enlarge the height of each line

axCalcEdit1.MultiLine = true;
axCalcEdit1.LineHeight = "value + 8 * dpi";
axCalcEdit1.DrawGridLines = true;
axCalcEdit1.InsertText("100",null);
axCalcEdit1.InsertText("200",null);
axCalcEdit1.InsertText("300",null);
axCalcEdit1.InsertText("Total",null);

30
How can I show grid lines

axCalcEdit1.MultiLine = true;
axCalcEdit1.DrawGridLines = true;
axCalcEdit1.GridLineColor = Color.FromArgb(0,0,0);
axCalcEdit1.InsertText("100",null);
axCalcEdit1.InsertText("200",null);
axCalcEdit1.InsertText("300",null);
axCalcEdit1.InsertText("Total",null);

29
How can I display the result of the total with a larger font

axCalcEdit1.MultiLine = true;
axCalcEdit1.DrawGridLines = true;
axCalcEdit1.LineHeight = "value  + 8 * dpi";
axCalcEdit1.FormatTotalResult = "<r><b><font ;14>%l%</font></b>";
axCalcEdit1.AllowTotal = "<b><font ;14>Total</font></b>";
axCalcEdit1.InsertText("100",null);
axCalcEdit1.InsertText("200",null);
axCalcEdit1.InsertText("300",null);
axCalcEdit1.InsertText("Total",null);

28
Is it possible to show the Total / SubTotal with a different background color

axCalcEdit1.MultiLine = true;
axCalcEdit1.AllowTotal = "<bgcolor=A0A0A0><b>Total</b></bgcolor>";
axCalcEdit1.AllowSubTotal = "<bgcolor=E0E0E0><b>SubTotal</b></bgcolor>";
axCalcEdit1.InsertText("100",null);
axCalcEdit1.InsertText("200",null);
axCalcEdit1.InsertText("SubTotal",null);
axCalcEdit1.InsertText("300",null);
axCalcEdit1.InsertText("400 * 1.5",null);
axCalcEdit1.InsertText("SubTotal",null);
axCalcEdit1.InsertText("Total",null);

27
Is it possible to show the Total / SubTotal with a different background color

axCalcEdit1.MultiLine = true;
axCalcEdit1.BackColorTotal = Color.FromArgb(196,196,196);
axCalcEdit1.BackColorSubTotal = Color.FromArgb(240,240,240);
axCalcEdit1.InsertText("100",null);
axCalcEdit1.InsertText("200",null);
axCalcEdit1.InsertText("SubTotal",null);
axCalcEdit1.InsertText("300",null);
axCalcEdit1.InsertText("400 * 1.5",null);
axCalcEdit1.InsertText("SubTotal",null);
axCalcEdit1.InsertText("Total",null);

26
How can I change the color to show the numbers

axCalcEdit1.FormatNumbers = "<fgcolor=FF0000> </fgcolor>";
axCalcEdit1.Text = "1 + 2 + 3 + 4";

25
The numbers are shown in blue. How can I remove that

axCalcEdit1.FormatNumbers = "";
axCalcEdit1.Text = "1 + 2 + 3 + 4";

24
How can I export the entire text, including the result

axCalcEdit1.MultiLine = true;
axCalcEdit1.Text = "100 * 1.5";
axCalcEdit1.InsertText("120 * 1.5",null);
axCalcEdit1.InsertText("130 * 1.5",null);
axCalcEdit1.InsertText("Total",null);
System.Diagnostics.Debug.Print( axCalcEdit1.Export );

23
Is it possible to display the result, using the current regional locale

axCalcEdit1.MultiLine = true;
axCalcEdit1.DrawGridLines = true;
axCalcEdit1.FormatResult = " <fgcolor=808080>[=%l%]</fgcolor>";
axCalcEdit1.FormatTotalResult = " <b>[=%l%]</b>";
axCalcEdit1.InsertText("100 * 100",null);
axCalcEdit1.InsertText("200 * 200",null);
axCalcEdit1.InsertText("300 * 300",null);
axCalcEdit1.InsertText("Total",null);

22
How can I change the format to display the total result (right)

axCalcEdit1.MultiLine = true;
axCalcEdit1.DrawGridLines = true;
axCalcEdit1.FormatTotalResult = "<b><fgcolor=FF0000> = %l%</fgcolor></b>";
axCalcEdit1.AllowTotal = "<b><fgcolor=00FF00>Total</fgcolor></b>";
axCalcEdit1.InsertText("100",null);
axCalcEdit1.InsertText("200",null);
axCalcEdit1.InsertText("300",null);
axCalcEdit1.InsertText("Total",null);

21
How can I change the format to display the total result (right)

axCalcEdit1.MultiLine = true;
axCalcEdit1.DrawGridLines = true;
axCalcEdit1.LineHeight = "value  + 4 * dpi";
axCalcEdit1.FormatTotalResult = "<r><b><font ;12>%l%</font></b>";
axCalcEdit1.AllowTotal = "<b><font ;12>Total</font></b>";
axCalcEdit1.InsertText("100",null);
axCalcEdit1.InsertText("200",null);
axCalcEdit1.InsertText("300",null);
axCalcEdit1.InsertText("Total",null);

20
Is it possible to rename the SubTotal

axCalcEdit1.MultiLine = true;
axCalcEdit1.AllowSubTotal = "<fgcolor=FF0000>Current Amount";
axCalcEdit1.InsertText("100",null);
axCalcEdit1.InsertText("200",null);
axCalcEdit1.InsertText("Current Amount",null);
axCalcEdit1.InsertText("300",null);
axCalcEdit1.InsertText("400",null);
axCalcEdit1.InsertText("Current Amount",null);
axCalcEdit1.InsertText("Total",null);

19
How can I disable the sub-totals

axCalcEdit1.MultiLine = true;
axCalcEdit1.AllowSubTotal = "";
axCalcEdit1.InsertText("100",null);
axCalcEdit1.InsertText("200",null);
axCalcEdit1.InsertText("SubTotal",null);
axCalcEdit1.InsertText("300",null);
axCalcEdit1.InsertText("400",null);
axCalcEdit1.InsertText("SubTotal",null);
axCalcEdit1.InsertText("Total",null);

18
How can I add sub-totals

axCalcEdit1.MultiLine = true;
axCalcEdit1.AllowComments = "<fgcolor=008000>'";
axCalcEdit1.AddWildFormat("<i>*=*<fgcolor=008000>'*");
axCalcEdit1.AllowVariables = "=";
axCalcEdit1.DrawGridLines = true;
axCalcEdit1.LineHeight = "value + 8 * dpi";
axCalcEdit1.GridLineColor = Color.FromArgb(196,196,196);
axCalcEdit1.FormatLocal = "currency(value)";
axCalcEdit1.FormatTotalResult = "<r><b> = %l%</b>";
axCalcEdit1.FormatSubTotalResult = "<r><fgcolor=808080>[<b> = %l%</b>]";
axCalcEdit1.FormatResult = "<r><fgcolor=808080>(%l%)";
axCalcEdit1.BackColorTotal = Color.FromArgb(240,240,240);
axCalcEdit1.BackColorLockedLine = Color.FromArgb(0,0,0);
axCalcEdit1.ForeColorLockedLine = Color.FromArgb(0,0,0);
axCalcEdit1.CalcType = EXCALCEDITLib.CalcTypeEnum.exCalcIncludeAll;
axCalcEdit1.Text = "100 + 200";
axCalcEdit1.InsertText("200 * 1.5",null);
axCalcEdit1.InsertText("SubA = SubTotal ' first subtotal",null);
axCalcEdit1.InsertText("300 + (200+300)/2",null);
axCalcEdit1.InsertText("400 + 500",null);
axCalcEdit1.InsertText("SubB = SubTotal ' second subtotal",null);
axCalcEdit1.InsertLockedText("VAT = Total * 0.19",null);
axCalcEdit1.InsertLockedText("Commision = Total * 0.05",null);
axCalcEdit1.InsertLockedText("NET = (Total - VAT) - Commision",null);
axCalcEdit1.InsertLockedText("Total",null);

17
Is it possible to disable the Total

axCalcEdit1.AllowTotal = "";
axCalcEdit1.MultiLine = true;
axCalcEdit1.InsertText("100",null);
axCalcEdit1.InsertText("200",null);
axCalcEdit1.InsertText("300",null);
axCalcEdit1.InsertText("Total",null);

16
Is it possible to rename the Total to Sum

axCalcEdit1.AllowTotal = "<fgcolor=FF0000><b>Sum</b></fgcolor>";
axCalcEdit1.MultiLine = true;
axCalcEdit1.InsertText("100",null);
axCalcEdit1.InsertText("200",null);
axCalcEdit1.InsertText("300",null);
axCalcEdit1.InsertText("Sum",null);

15
Is it possible to add all lines

axCalcEdit1.MultiLine = true;
axCalcEdit1.InsertText("100",null);
axCalcEdit1.InsertText("200",null);
axCalcEdit1.InsertText("300",null);
axCalcEdit1.InsertText("Total",null);

14
How do I insert / add a new line

axCalcEdit1.MultiLine = true;
axCalcEdit1.Text = "100 * 1.5";
axCalcEdit1.InsertText("120 * 2.5\\r\\n",1);
axCalcEdit1.InsertText("200 * 1.5",null);

13
How do I find out if a specified line is valid

// SelChange event - Occurs when the user selects text in the control.
private void axCalcEdit1_SelChange(object sender, EventArgs e)
{
	System.Diagnostics.Debug.Print( "CurrentLine: " );
	System.Diagnostics.Debug.Print( axCalcEdit1.CaretLine.ToString() );
	System.Diagnostics.Debug.Print( "CurrentLine: " );
	System.Diagnostics.Debug.Print( axCalcEdit1.get_TextLine(axCalcEdit1.CaretLine) );
	System.Diagnostics.Debug.Print( "IsValid: " );
	System.Diagnostics.Debug.Print( axCalcEdit1.get_IsValid(axCalcEdit1.CaretLine).ToString() );
}
//this.axCalcEdit1.SelChange += new EventHandler(this.axCalcEdit1_SelChange);

axCalcEdit1.MultiLine = true;
axCalcEdit1.Text = "100 * 1.5";
axCalcEdit1.InsertText("invalid",null);
axCalcEdit1.InsertText("120 * 1.5",null);
axCalcEdit1.InsertText("130 * 1.5",null);

12
How do I get the current line

// SelChange event - Occurs when the user selects text in the control.
private void axCalcEdit1_SelChange(object sender, EventArgs e)
{
	System.Diagnostics.Debug.Print( "CurrentLine: " );
	System.Diagnostics.Debug.Print( axCalcEdit1.CaretLine.ToString() );
	System.Diagnostics.Debug.Print( "CurrentLine: " );
	System.Diagnostics.Debug.Print( axCalcEdit1.get_TextLine(axCalcEdit1.CaretLine) );
	System.Diagnostics.Debug.Print( "CurrentResult: " );
	System.Diagnostics.Debug.Print( axCalcEdit1.get_Result(axCalcEdit1.CaretLine).ToString() );
}
//this.axCalcEdit1.SelChange += new EventHandler(this.axCalcEdit1_SelChange);

axCalcEdit1.MultiLine = true;
axCalcEdit1.Text = "100 * 1.5";
axCalcEdit1.InsertText("120 * 1.5",null);
axCalcEdit1.InsertText("130 * 1.5",null);

11
How do I get the line one by one, including the result

axCalcEdit1.MultiLine = true;
axCalcEdit1.Text = "100 * 1.5";
axCalcEdit1.InsertText("120 * 1.5",null);
axCalcEdit1.InsertText("130 * 1.5",null);
System.Diagnostics.Debug.Print( "Lines:" );
System.Diagnostics.Debug.Print( axCalcEdit1.Count.ToString() );
System.Diagnostics.Debug.Print( "TextLine(1):" );
System.Diagnostics.Debug.Print( axCalcEdit1.get_TextLine(1) );
System.Diagnostics.Debug.Print( "Result(1)" );
System.Diagnostics.Debug.Print( axCalcEdit1.get_Result(1).ToString() );
System.Diagnostics.Debug.Print( "TextLine(2):" );
System.Diagnostics.Debug.Print( axCalcEdit1.get_TextLine(2) );
System.Diagnostics.Debug.Print( "Result(2)" );
System.Diagnostics.Debug.Print( axCalcEdit1.get_Result(2).ToString() );
System.Diagnostics.Debug.Print( "TextLine(3):" );
System.Diagnostics.Debug.Print( axCalcEdit1.get_TextLine(3) );
System.Diagnostics.Debug.Print( "Result(3)" );
System.Diagnostics.Debug.Print( axCalcEdit1.get_Result(3).ToString() );

10
Does the control supports multiple lines

axCalcEdit1.MultiLine = true;
axCalcEdit1.Text = "100 * 1.5";
axCalcEdit1.InsertText("120 * 1.5",null);
axCalcEdit1.InsertText("130 * 1.5",null);

9
Is it possible to display the result without brakets

axCalcEdit1.FormatResult = "<fgcolor=808080> = %%</fgcolor>";
axCalcEdit1.Text = "12 + (12 / 100)/2";

8
How can I display the result on the right side of the control

axCalcEdit1.FormatResult = "<r> <fgcolor=808080>[=%%]</fgcolor>";
axCalcEdit1.Text = "12 + (12 / 100)/2";

7
Can you please advise how to change fontname and size (sample 2)

axCalcEdit1.Template = "Font.Size = 20; Font.Name = `Tahoma`; Refresh";
axCalcEdit1.Text = "1/2";

6
Can you please advise how to change fontname and size (sample 1)

axCalcEdit1.Font.Size = 20;
axCalcEdit1.Text = "1/2";
axCalcEdit1.Refresh();

5
How can I disable evaluating the selection

axCalcEdit1.EvaluateSel = false;
axCalcEdit1.HideSelection = false;
axCalcEdit1.Text = "(1+6.25)/4*6/3";
axCalcEdit1.SelStart = 1;
axCalcEdit1.SelLength = 6;
axCalcEdit1.SelBackColor = Color.FromArgb(0,0,0);

4
Can I define a different decimal separator

axCalcEdit1.AddDecimalSep = ",";
axCalcEdit1.Text = "(1+6,25)/4*6/3";

3
How do I change the color of the entire control, if the expression is not valid

// Change event - Indicates that the control's text has changed.
private void axCalcEdit1_Change(object sender, EventArgs e)
{
	System.Diagnostics.Debug.Print( "Valid:" );
	System.Diagnostics.Debug.Print( axCalcEdit1.get_IsValid(null).ToString() );
	axCalcEdit1.ForeColor = Color.FromArgb(255,0,0);
	axCalcEdit1.FormatNumbers = "<fgcolor FF0000>";
	axCalcEdit1.FormatResult = "";
}
//this.axCalcEdit1.Change += new EventHandler(this.axCalcEdit1_Change);

axCalcEdit1.FormatInvalid = "";
axCalcEdit1.Text = "invalid(1+6.25)/4*6/3";

2
Is there any function to know if the expression is valid

// Change event - Indicates that the control's text has changed.
private void axCalcEdit1_Change(object sender, EventArgs e)
{
	System.Diagnostics.Debug.Print( "Valid:" );
	System.Diagnostics.Debug.Print( axCalcEdit1.get_IsValid(null).ToString() );
	System.Diagnostics.Debug.Print( "Expression: " );
	System.Diagnostics.Debug.Print( axCalcEdit1.Text );
	System.Diagnostics.Debug.Print( "Result: " );
	System.Diagnostics.Debug.Print( axCalcEdit1.get_Result(null).ToString() );
}
//this.axCalcEdit1.Change += new EventHandler(this.axCalcEdit1_Change);

axCalcEdit1.Text = "(1+6.25)/4*6/3";

1
How do I programatically save / load the expression and the result

axCalcEdit1.Text = "(1+6.25)/4*6/3";
System.Diagnostics.Debug.Print( "Expression: " );
System.Diagnostics.Debug.Print( axCalcEdit1.Text );
System.Diagnostics.Debug.Print( "Result: " );
System.Diagnostics.Debug.Print( axCalcEdit1.get_Result(null).ToString() );