The valid format characters: 9 - Numbers ("." OK): 999.99 A - Alpha onle: AAAAAAA ! - Convert to upper case: !!!!! X - Anything: XXXXXXX
Text8
To imbed literal characters in a format string, you must prefix the string with "@L ". For exampl "@L 99/99/99" - Dates "@L 999-99-9999" - Social Security Number "@L 999-999-9999 - Phone #
Text2
To use the format functions in your code: 1) Add MODULE1.BAS to your project 2) Put calls to MyFormat(), CheckFormat(), and InitFormat() in the Text Control as shown below:
Text3
Calling sequences:
Text6
FMyFormat(Control, KeyAscii, FormatString) - Put in KeyPress event
Text5
DCheckFormat(Control, FormatString, DoBeep) - Put in LostFocus event
Text7
LInitFormat(Control, FormatString) - Put in GotFocus event
Label1
Warning:
Text4
This is only sample code! It is only meant to get you started. It has not been thoroughly tested. If you have questions, contact Ron Wodaski at 412-833-7765.