Masked Text Controls ; Article No. 1

by Soong Chong - GUI Computing

I have never quite liked the mask control that comes with Visual Basic 3 Professional. It never seemed to work quite the way I wanted it to.

Do I really need to add another VBX to my application? Do I want to worry about installation and version control of another VBX? Well, without hesitation, um... No! My needs are simple. I want a text control that only accepts numeric characters that are typed in by the user.

This code is how I achieved it. You can place the following code in any text control keypress event:


Written by: Soong Chong
Oct 95




[HOME] [TABLE OF CONTENTS] [SEARCH]