Advertisement

07.20.2008 at 08:45AM PDT, ID: 23580183
[x]
Attachment Details

How can I cancel a cancel a key from being pressed in one of my textboxes in vb6?

Asked by troehm in Visual Basic Programming, VB Objects

Tags: Microsoft, Visual Basic, 6

Hi everyone,

What i'm trying to do here is basically only allow upper and lowercase letters to be entered into a textbox on my form. In the keypress event I can detect what I need fine, but how do I go about not letting that key through if it isn't a letter. I've been reading that I need to do something with the KeyEventArgs.Handled property in the System.Windows.Forms.dll? I've been reading and reading on MSDN and other sites and I just can't seem to figure this out. I need some help! Thanks guysStart Free Trial
[+][-]07.20.2008 at 09:10AM PDT, ID: 22046115

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Visual Basic Programming, VB Objects
Tags: Microsoft, Visual Basic, 6
Sign Up Now!
Solution Provided By: jpaulino
Participating Experts: 2
Solution Grade: A
 
 
[+][-]07.20.2008 at 09:48AM PDT, ID: 22046216

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628