FlexMaskEditBox for VB6	 		

The power of Flex:

No Bullshit with maskeditbox.mask = "", or .seltext = "any text"
Just flexMaskEditBox1 = "any text" without turning off the mask.

When no mask is given, The Flex will acts like a standard textbox

	Delete - delete char right from the cursor
Shift +	Delete - delete char left from the cursor
Ctrl  + Delete - delete all chars right from the cursor
					
	BackSpace - delete position in front of the cursor + drags chars after the cursor 1 position
Shift + BackSpace - delete position in front of the cursor (don't drag)

Shift + Left Arrow or Right Arrow, select text. 
	next Del to delete or right mouse button

right mouse button select Calculator. Input through the keyboard or mouse click

Select numeric if:
-  working with decimals 
   mask for instance "#####.##" or "99.99" or "(##.##)  >????" or "##.## ##.##" 
   Flex goes automatic to the decimal point when pushed.
-  the (-) sign is valid by mask sign (9)

-Century On
   auto century in mask
   when century is 0 then century from the current date
   when century = ON then the signs "##-##-\1\9##" will (for instance) appear in the mask
   and may be change in (for instance) "##-##-##", MaxLength on 8!!. The textbox
   gives by input "12-12-23" also the century "12-12-1923".
	

Check on a valid date
Private Sub FlexMaskBox1_Validate(Cancel As Boolean) (dd-mm-yyyy)
If Not FlexMaskBox1.ValidDate Then
   MsgBox "No Valid Date"
   Cancel = True
End If
End Sub


Mask signs (the same as the MS maskeditbox)
You are so free as your own ingenuity 
   (People with an artistic background has the highest score :))

(#) - (chr 48 - 57)

(9) - (chr 48 - 57) (-) minus sign

(?) - (chr 65 - 90) (chr 97 - 121)

(A)  (C)  - (chr 65 - 90) (chr 97 - 121) (chr 48 - 57)

(a)  (c) - (chr 65 - 90) (chr 97 - 121) (chr 48 - 57) (chr 32 )

(&) - (chr 32 - 126) (chr 128 - 255)

(\)  Next char will be no mask char

(>) All chars next to the > sign will transformed in upper-case
    until the next mask char is an (<) or (\)

(}) Next 1 Char will transformed in upper-case
    
    
(<) All chars next to the < sign will transformed in lower-case
    until the next mask char is an (>) or (\)

({) Next 1 Char will transformed in lower-case
    
a few mask examples (also combinations are possible)
Prompchar "_"
				ON		OFF		ON		OFF
Input           mask            PrompCharIncl	PrompCharIncl	MaskCharIncl	MaskCharIncl 
"abCD"		">AA\a<aaa"	"ABacd_"	"ABacd"		"ABacd_"	"ABcd_"

"den haag"      "}????}?????"   "Den Haag_"     "Den Haag"      "Den Haag_"     "Den Haag_"
"123456"  	"99.99.999"	"12.34.56_"	"12.34.56	"12.34.56_"	"123456_"	
		
Numeric ON
"12.3"		"999.99"	"_12.3_"	"12.3"		"_12.3_"	"_123__"

Numeric OFF
"12.3"		"999.99"	"_12.3_"	"12.3"		"_12.3_"	"_123_"

"12-12-90"	"##-##-1\9##"  "12-12-1990"	"12-12-1990"	"12-12-1990"	"121290"


The length of the mask is the maximum between maxlength and Mask
BV:
				before		after
inputmask	will be 	Maxlength	Maxlength	text
"##.## >a"	"##.## >aaaa"	10		10		"12.34 ABCD"			
"?"		"??????????"	10		10		"abcdefghij"
"####"		"####"		0		4		"1234"


When there has been an mutation in the textfield, the property DataHasChanged will be TRUE
The property DataChanged stays FALSE. 
						DataControl
Text	Newtext	DataHasChanged	DataChanged	DataMoveNext
"JOOP"	"JAAP"	TRUE		FALSE		NOT Updated

In for instance event Change()
if FlexEditBox1.DataHasChanged then
	...........
	FlexEditBox1.DataChanged = TRUE
	data1.recordset.movenext
 .....

If FlexEditBox1.ValidDate then FlexEditBox1.dataChanged = True

FlexMaskBox1 = "sfdsfdsfd"
FlexMaskBox1.FormatString = ">"
Debug.Print FlexMaskBox1.FormatedTxt  'will be SFDSFDSFD

Every format string is valid because the Format() function is evaluated.
FlexMaskBox1.FormatString = "dddd-d mmmm-yyyy" 'in a date box 
 
