VB School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become a VB Expert!

Join 307,173 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,571 people online right now. Registration is fast and FREE... Join Now!




How to disable the keys

 

How to disable the keys

muddasir

20 Dec, 2007 - 03:20 AM
Post #1

D.I.C Head
Group Icon

Joined: 14 Jan, 2007
Posts: 109



Thanked: 7 times
Dream Kudos: 200
My Contributions
i am using vb6
i want that in my whole programe user can
only put data in numbers(0-9) alphabetes(a*-z)
and .(dot/point) only.
now how can i disable all the other keys

i know the code how to permit the keys in
the key press evet of any textbox
whic i uses this code

QUOTE
Dim comp As Boolean
comp = Chr(KeyAscii) Like "[1-9.0]"
If Chr(KeyAscii) = vbBack Then Exit Sub
If comp = False Then
KeyAscii = 0
End If


now insted of writing it to all the text boxes
(which are huge in no) i want to disable the
other keys in start module
how to do this


User is offlineProfile CardPM
+Quote Post


Posts in this topic
muddasir   How to disable the keys   20 Dec, 2007 - 03:20 AM
Martyr2   All you need to do is create a function that takes...   20 Dec, 2007 - 09:41 AM

Fast ReplyReply to this topicStart new topic

Time is now: 11/21/09 07:04PM

Live VB Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month