A1VBCode Forums

can anyone help me to create a usercontrol


http://www.a1vbcode.com/vbforums/Topic8925.aspx

By pras - 2/23/2005

hi guys

  i want to know how to create a user control , i want a textbox to except only numeric characters  , how can i create this control , is this a user control or ocx control , pls let me know

thanks

pras

By Eddie74 - 1/23/2006

The above code is good, but you still need to know how to create a user control.  First, i will assume you are useing vb6.  Click new project > user control.

second - place a textbox on the top left hand corner. set the top and left properties to 0.

Third set the UserControl width and height to match the text box's width and height.

Run the Active X control interface  wizard and assign all the usual properties to the textbox control.  Add the code provided above. Compile the project into an OCX. Voila. Finished.