59
Is it possible to hide the context's images

With Expression1
	.ImageSize = 0
	.LineHeight = "dpi*16"
	.Images "gBJJgBAIDAAEg4ACEKAD/hz/EMNh8TIRNGwAjEZAEXjAojJAjMLjABAAgjUYkUnlUrlktl0vmExmUzmk1m03nE5nU7nkrQCAntBoVDolFo1HoM/ADAplLptImdMYFOq" & _
"dSqlXq1QrVbrlGpVWsFNrNdnNjsk7pQAtNroFnt0sh8Yr9iulTuNxs1Eu8OiT/vsnsNVutXlk/oGGtVKxGLxWNtsZtN8iUYuNvy0Zvd+xNYwdwvl4p870GCqc8vOeuVt" & _
"tmp1knyOayWVy+WzN/ze1wOElenm+12WUz/Bv2/3UyyWrzeutux2GSyGP2dQ33C1ur3GD3M4zUNzHdlWjq/E3nGzVpjWv4HA7fRy/Tv2IrN8rPW6nZ3ve7mUlfu20Z8a" & _
"cvQyb+vY9jasYoDwMm+LytVBDqKG3z8O3Cb8P+mkAuY9cCQ2uL4KaxDKvkp8RNLEjqugnrwQo/UWPzFyeQw5sNLZFENrI4kOqU66pw8uzmOKvTqNqjULJvGL1JO48GtT" & _
"GsbLdEL3scxLlyiw8dQeoUVxdLTtyKmUjwGlslRPJsnK1HbAKbKCrsQo8uQk/CeP44iaR/ATnTNPLvyxPU+z9P9AUDQVBowiofJXQ6Oo+kKMpIkjztE4TKn4P6JowfgP" & _
"nwD5/nAjB8AOeAPo0eAA1IAFH07UhAIMpYAVIYFHqBUhwVjV1S1EtQAHxW65V0AZwAeuQAnwB5gAPYViEDVhwAHTQBkCjB4gOhwDmCyhH0sACAg=="
	.Expression = "value format ``"
	.SplitPaneWidth = 312
End With
58
ImageSize property on 32 (specifies the size of control' icons/images/check-boxes/radio-buttons)

With Expression1
	.ImageSize = 32
	.Font.Size = 16
	.ToolTipFont.Size = 16
	.ToolTipWidth = 512
	.LineHeight = "dpi*32"
	.Images "gBJJgBAIDAAEg4AEEKAD/hz/EMNh8TIRNGwAjEZAEXjAojKAjMLjABhkaABAk0plUrlktl0vmExmUzm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= "value format ``"
	.SplitPaneWidth = 312
End With
57
ImageSize property on 16 (default) (specifies the size of control' icons)

With Expression1
	.ImageSize = 16
	.LineHeight = "dpi*16"
	.Images "gBJJgBAIDAAEg4ACEKAD/hz/EMNh8TIRNGwAjEZAEXjAojJAjMLjABAAgjUYkUnlUrlktl0vmExmUzmk1m03nE5nU7nkrQCAntBoVDolFo1HoM/ADAplLptImdMYFOq" & _
"dSqlXq1QrVbrlGpVWsFNrNdnNjsk7pQAtNroFnt0sh8Yr9iulTuNxs1Eu8OiT/vsnsNVutXlk/oGGtVKxGLxWNtsZtN8iUYuNvy0Zvd+xNYwdwvl4p870GCqc8vOeuVt" & _
"tmp1knyOayWVy+WzN/ze1wOElenm+12WUz/Bv2/3UyyWrzeutux2GSyGP2dQ33C1ur3GD3M4zUNzHdlWjq/E3nGzVpjWv4HA7fRy/Tv2IrN8rPW6nZ3ve7mUlfu20Z8a" & _
"cvQyb+vY9jasYoDwMm+LytVBDqKG3z8O3Cb8P+mkAuY9cCQ2uL4KaxDKvkp8RNLEjqugnrwQo/UWPzFyeQw5sNLZFENrI4kOqU66pw8uzmOKvTqNqjULJvGL1JO48GtT" & _
"GsbLdEL3scxLlyiw8dQeoUVxdLTtyKmUjwGlslRPJsnK1HbAKbKCrsQo8uQk/CeP44iaR/ATnTNPLvyxPU+z9P9AUDQVBowiofJXQ6Oo+kKMpIkjztE4TKn4P6JowfgP" & _
"nwD5/nAjB8AOeAPo0eAA1IAFH07UhAIMpYAVIYFHqBUhwVjV1S1EtQAHxW65V0AZwAeuQAnwB5gAPYViEDVhwAHTQBkCjB4gOhwDmCyhH0sACAg=="
	.Expression = "value format ``"
	.SplitPaneWidth = 312
End With
56
How can I convert the bytes to KB (kilo-bytes), MB (mega-bytes) or GB (giga-bytes)

With Expression1
	.SplitPaneWidth = 256
	.Expression = "int(0:=(1:=value)/1024/1024/1024) ? round(=:0*10)/10 + ` GB` : (int(0:==:1/1024/1024) ? round(=:0*10)/10 + ` MB` : (int(0:==:1/" & _
"1024) ? round(=:0*10)/10 + ` KB` : =:1 + ` B`))"
	.EvaluationText = "value = 18\r\nvalue=1888\r\nvalue=18888888\r\nvalue=1888888888"
End With
55
Convert local time to Coordinated Universal Time (UTC)

With Expression1
	.Expression = "type(value) = 7 ? date(value + bias/24/60) : value"
	.SplitPaneWidth = 256
End With
54
Convert Coordinated Universal Time (UTC) to local time

With Expression1
	.Expression = "type(value) = 7 ? date(value - bias/24/60) : value"
	.SplitPaneWidth = 256
End With
53
How can I show values with 1 decimal only if not integer such as 1.5, 2 (method 2)

With Expression1
	.Expression = "(((value format `1|,|3|,`) + `x`) replace `,0x` with ``) replace `x` with ``"
	.SplitPaneWidth = 256
End With
52
How can I show values with 1 decimal only if not integer such as 1.5, 2 (method 1)

With Expression1
	.Expression = "value format `1|.|3|,` replace `.0` with ``"
End With
51
The sample displays the value in years, months, weeks, days, hours, minutes and secons

With Expression1
	.Expression = "trim((1:=int((0:=value)/365) ? =:1 + ` year(s) ` : ``)  + (1:=int((0:=(=:0 - (=:1*365)))/31) ? =:1 + ` month(s) ` : ``) + (1:=i" & _
"nt((0:=(=:0 - (=:1*31)))/7) ? =:1 + ` week(s) ` : ``) + (1:=int((0:=(=:0 - (=:1*7)))/1) ? =:1 + ` day(s) ` : ``) + (1:=int((0:=(" & _
"=:0 - =:1 + 1/24/60/60/2))*24) ? =:1 + ` hour(s) ` : ``) + (1:=int((0:=(=:0*24 - =:1))*60) ? =:1 + ` min(s) ` : ``) + (1:=int((0" & _
":=(=:0*60 - =:1))*60) ? =:1 + ` sec(s)` : ``))"
	.EvaluationText = "value = 1\r\nvalue=2 + 1/24/60\r\nvalue=365 + 12 * 1/24\r\nvalue=1212.25\r\nvalue=366.02512"
	.SplitPaneWidth = 464
End With
50
The sample displays the value in seconds

With Expression1
	.Expression = "(1:=(int(0:=(value*24*60*60 + 1/24/60/60/2))) ? =: 1 + ` sec(s)` : ``)"
	.EvaluationText = "value = 1\r\nvalue=2 + 1/24/60\r\nvalue=365 + 12 * 1/24\r\nvalue=1212.25\r\nvalue=366.02512"
	.SplitPaneWidth = 256
End With
49
The sample displays the value in minutes and seconds

With Expression1
	.Expression = "trim((1:=(int(0:=(value*24*60 + 1/24/60/60/2))) ? =: 1 + ` min(s)` : ``) + ` ` + (2:=int((=:0 - =:1)*60) ? =:2 + ` sec(s)` : ``" & _
"))"
	.EvaluationText = "value = 1\r\nvalue=2 + 1/24/60\r\nvalue=365 + 12 * 1/24\r\nvalue=1212.25\r\nvalue=366.02512"
	.SplitPaneWidth = 256
End With
48
The sample displays the value in hours and minutes

With Expression1
	.Expression = "((1:=int(0:=( 24*int(value) + (value - int(value) + 1/24/60/60/2)*24))) != 0 ? =:1 + ' hour(s)' : '' ) + (=:1 ? ' ' : '' ) + ((" & _
"1:=round((=:0 - =:1)*60)) != 0 ? =:1 + ' min(s)' : '')"
	.EvaluationText = "value = 1\r\nvalue=2 + 1/24/60\r\nvalue=365 + 12 * 1/24\r\nvalue=1212.25\r\nvalue=366.02512"
	.SplitPaneWidth = 256
End With
47
How can I check for a blank-date (sample 3) Expression

With Expression1
	.Expression = "type(value) case ( default : `<fgcolor=000000><s>invalid</s></fgcolor>`; 0 : `<fgcolor=FF0000>null</fgcolor>`; 1 : `null` ; 7 :" & _
" longdate(value) )"
	.SplitPaneWidth = 256
End With
46
How can I check for a blank-date (sample 2) Expression

With Expression1
	.Expression = "len(value) ? longdate(value) : ``"
	.SplitPaneWidth = 256
End With
45
How can I check for a blank-date (sample 1) Expression

With Expression1
	.Expression = "type(value) = 7 ? longdate(value) : ``"
	.SplitPaneWidth = 256
End With
44
Easter Sunday

With Expression1
	.Expression = "date(dateS('3/1/' + year(value)) + ((1:=(((255 - 11 * (year(value) mod 19)) - 21) mod 30) + 21) + (=:1 > 48 ? -1 : 0) + 6 - ((y" & _
"ear(value) + int(year(value) / 4)) + =:1 + (=:1 > 48 ? -1 : 0) + 1) mod 7))"
	.SplitPaneWidth = 256
End With
43
The sample displays the value in days, hours and minutes

With Expression1
	.Expression = "((1:=int(0:= (value))) != 0 ? (=:1 + ' day(s)') : '') + (=:1 ? ' ' : '' ) + ((1:=int(0:=((=:0 - =:1 + 1/24/60/60/2)*24))) != 0 " & _
"? =:1 + ' hour(s)' : '' ) + (=:1 ? ' ' : '' ) + ((1:=round((=:0 - =:1)*60)) != 0 ? =:1 + ' min(s)' : '')"
	.SplitPaneWidth = 256
End With
42
How can I display the date in short format

With Expression1
	.Expression = "shortdate(date(value))"
	.SplitPaneWidth = 256
End With
41
How can I display the date in long format

With Expression1
	.Expression = "longdate(date(value))"
	.SplitPaneWidth = 256
End With
40
The sample displays the positive values in blue, being preceded by + sign, negative values in red preceded by - sign, 0 as 0.00 while for null values is displays null. The numbers are displayed using 2 digits, . as decimal separator and grouping by 3 digits by , separator

With Expression1
	.Expression = "type(value) in (0,1) ? 'null' : ( dbl(value)<0 ? '<fgcolor=FF0000>'+ (value format '2|.|3,' ) : (dbl(value)>0 ? '<fgcolor=0000F" & _
"F>+'+(value format '2|.|3,' ): '0.00') ) "
	.SplitPaneWidth = 256
End With
39
How can I format a numeric value so it display as a currency

With Expression1
	.Expression = "currency(dbl(value))"
	.SplitPaneWidth = 256
End With
38
How can I format a numeric value to with grouping

With Expression1
	.Expression = "dbl(value) format ''"
	.SplitPaneWidth = 256
End With
37
How can I convert the value to a numeric ( integer ) value

With Expression1
	.Expression = "int(value)"
	.SplitPaneWidth = 256
End With
36
How can I convert the value to a numeric ( double ) value

With Expression1
	.Expression = "dbl(value)"
	.SplitPaneWidth = 256
End With
35
How can I format a date as YYYY-MMM-DD (sample 4)

With Expression1
	.Expression = "(year(value) + '-') + (month(value) array('','Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec')) + '-' + " & _
"(day(value)<10 ? '0' : '') + day(value)"
	.SplitPaneWidth = 256
End With
34
How can I format a date as YYYY-MMM-DD (sample 3)

With Expression1
	.Expression = "(2 array ( 0 := (shortdateF(value) split `/`) ) ) + `-`+ ((month(value) - 1) array `Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov" & _
" Dec` split ` `) + `-`+ (1 array =: 0)"
	.SplitPaneWidth = 256
End With
33
How can I format a date as YYYY-MMM-DD (sample 2)

With Expression1
	.Expression = "ltrim((2 array longdate(value) split `,`)) + `-` +  ((1 array (1 array longdate(value) split `,`) split ` `) left 3 ) + `-` + (" & _
"`00` left (2 - len(day(value)))) + day(value)"
	.SplitPaneWidth = 256
End With
32
How can I format a date as YYYY-MMM-DD (sample 1)

With Expression1
	.Expression = "year(value) + `-` +  (month(value)-1 array ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec')) + `-` + (" & _
"`00` left (2 - len(day(value)))) + day(value)"
	.SplitPaneWidth = 256
End With
31
How can I use my own operators only

With Expression1
	.AllowValueKeyword = False
	.AllowDefaultOperators = False
	.AddCustomOperator "+","<b>+</b>","This is a new binary-operator",2
	.AddCustomOperator "xxx","<b>xxx</b>","This is a new keyword",0
	.AddCustomOperator "yyy","<b>yyy</b>","This is a unary-operator",1
	.AddCustomOperator "zzz","<b>zzz</b>","This is a binary-operator",2
	.Text = "xxx + yyy(100 zzz 200)"
End With
30
How can I add a new binary-operator

With Expression1
	.AddCustomOperator "xxx","<b>xxx</b>","This is a new binary-operator",2
	.Text = "value + 100 xxx 200"
End With
29
How can I add a new unary-operator

With Expression1
	.AddCustomOperator "xxx","<b>xxx</b>","This is a new unary-operator",1
	.Text = "value + xxx(100)"
End With
28
How can I add a new keyword

With Expression1
	.AddCustomOperator "xxx","<b>xxx</b>","This is a new keyword",0
	.Text = "value + xxx"
End With
27
How can I disable all operators
With Expression1
	.AllowValueKeyword = False
	.AllowDefaultOperators = False
End With
26
How can I disable the value keyword
With Expression1
	.AllowValueKeyword = False
End With
25
Usage of and ( and operator )

With Expression1
	.SplitPaneWidth = 196
	.Expression = "(value contains 1) and (value != 1)"
End With
24
Usage of or ( or operator )

With Expression1
	.SplitPaneWidth = 196
	.Expression = "(value=1) or value=`string`"
End With
23
Usage of not ( not operator )

With Expression1
	.SplitPaneWidth = 196
	.Expression = "not(value=1)"
End With
22
Usage of - ( subtraction operator )

With Expression1
	.SplitPaneWidth = 196
	.Expression = "value - 2"
End With
21
Usage of + ( addition operator )

With Expression1
	.SplitPaneWidth = 196
	.Expression = "value + 2"
End With
20
Usage of mod ( reminder operator )

With Expression1
	.SplitPaneWidth = 196
	.Expression = "value mod 2"
End With
19
Usage of / (divide operator)

With Expression1
	.SplitPaneWidth = 196
	.Expression = "value / 2"
End With
18
Usage of * (multiplicity operator)

With Expression1
	.SplitPaneWidth = 196
	.Expression = "2 * value"
End With
17
How can I get the word from cursor when user double clicks the control
' DblClick event - Occurs when the user double clicks the left mouse button over an object.
Private Sub Expression1_DblClick(ByVal Shift As Integer,ByVal X As Long,ByVal Y As Long)
	With Expression1
		Debug.Print( "Word: " )
		Debug.Print( .WordFromPoint(-1,-1) )
	End With
End Sub

With Expression1
	.Expression = "value"
	.AllowSplitter = 2
	.SplitPaneHeight = 196
End With
16
How do I determine the word from the cursor
' Click event - Occurs when the user presses and then releases the left mouse button over the list control.
Private Sub Expression1_Click()
	With Expression1
		Debug.Print( "Word: " )
		Debug.Print( .WordFromPoint(-1,-1) )
	End With
End Sub

With Expression1
	.Expression = "value"
	.SplitPaneHeight = 196
	.Background(1) = RGB(240,240,240)
	.AllowSplitter = 2
End With
15
How can I check if the expression is valid/syntactically correct
' Change event - Indicates that the control's text has changed.
Private Sub Expression1_Change()
	With Expression1
		Debug.Print( "Valid: " )
		Debug.Print( .IsValid )
	End With
End Sub

With Expression1
	.Expression = "value"
	.SplitPaneHeight = 196
	.Background(1) = RGB(240,240,240)
	.AllowSplitter = 2
End With
14
How can I change the visual appearance of the horizontal splitter

With Expression1
	.Expression = "value"
	.SplitPaneHeight = 196
	.Background(1) = RGB(240,240,240)
	.AllowSplitter = 2
End With
13
How can I change the visual appearance of the vertical splitter

With Expression1
	.Expression = "value"
	.SplitPaneWidth = 196
	.Background(0) = RGB(240,240,240)
End With
12
How can I add a new menu-item to control's context menu
' ExecuteContextMenu event - Occurs when the user selects an user item from the control's context menu.
Private Sub Expression1_ExecuteContextMenu(ByVal Item As String,ByVal Position As Long)
	With Expression1
		Debug.Print( "ExecuteContextMenu: " )
		Debug.Print( Item )
	End With
End Sub

With Expression1
	.Expression = "value + 100"
	.ContextMenuItems = "Test"
End With
11
How can I change the tooltip that shows when cursor hovers a keyword

With Expression1
	.Expression = "value"
	.Description(0) = "This is a bit of text to be shown when cursor hovers the <b>value</b> keyword."
	.Refresh 
End With
10
How do I check if the expression is correct
With Expression1
	.Expression = "currency(value)"
	Debug.Print( .IsValid )
End With
9
How do I programmatically evaluate the expression
With Expression1
	.Expression = "currency(value)"
	Debug.Print( .Evaluate("value=100") )
End With
8
How can I assign multiple values for variables %1, %2, ...

With Expression1
	.SplitPaneWidth = 196
	.Expression = "currency(%1 + %2)"
	.EvaluationText = "%1 = 100;%2 = 200"
End With
7
How can I change the values to show the result
With Expression1
	.SplitPaneWidth = 196
	.Expression = "currency(value)"
	.EvaluationText = "value = 100"
End With
6
How can I prevent changing the color when expression is invalid
With Expression1
	.SplitPaneWidth = 196
	.Expression = "value 2"
	.ForeColorInvalid = RGB(0,0,0)
End With
5
How can I change the color when expression is invalid
With Expression1
	.SplitPaneWidth = 196
	.Expression = "value 2"
	.ForeColorInvalid = RGB(255,0,0)
End With
4
How can I prevent evaluation the selection

With Expression1
	.SplitPaneWidth = 196
	.Expression = "value + 1"
	.EvaluateSelection = False
	.HideSelection = False
	.SelLength = 1
End With
3
How can I programatically show the result
With Expression1
	.SplitPaneWidth = 196
	.Expression = "value"
End With
2
How can I get ride of the right-vertical line/split
With Expression1
	.AllowSplitter = 0
	.Expression = "value + 1"
End With
1
How can I change the control's background
With Expression1
	.Expression = "value"
	.BackColor = RGB(240,240,240)
End With