Re: keypress question
From: Ken Tucker [MVP] (vb2ae_at_bellsouth.net)
Date: 02/24/04
- Next message: JackRazz: "Re: .NET Control in Title Bar"
- Previous message: Ken Tucker [MVP]: "Re: Impersonation half way working"
- In reply to: starbuck: "keypress question"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 24 Feb 2004 01:34:55 -0500
Hi,
In addition to Herfried's comments you can set the textbox's
charactercasing to charactercasing.upper if you only want upper case
letters.
Ken
------------
"starbuck" <starbuck@mbssoft.co.uk> wrote in message
news:eqygx5l%23DHA.3812@TK2MSFTNGP09.phx.gbl...
> Hi All
>
>
>
> We are converting a VB6 app to VB.NET and have come across a little
problem
>
> In VB6 the following code
>
>
>
> Private Sub User_txt_KeyPress(KeyAscii As Integer)
>
> KeyAscii = Key_Filter_Alpha(KeyAscii)
>
> End Sub
>
>
>
> Calls
>
>
>
> Function Key_Filter_Alpha(keyc%) As Integer
>
>
>
> Select Case keyc%
>
> Case 32
>
> Case 3 'Ctrl C
>
> Case 24 'Ctrl X
>
> Case 8 'BackSpace
>
> Case 48 To 57 'Number 0-9
>
> Case 65 To 90 'A-Z
>
> Case 97 To 122 'a-z
>
> keyc% = keyc% - 32
>
> Case Else
>
> keyc% = 0
>
> End Select
>
>
>
> Key_Filter_Alpha = keyc%
>
>
>
> End Function
>
>
>
> And only returns upper case letters, nothing else. We can not seem to get
> this to work in VB.NET, and ideas, hints etc.
>
>
>
> Thanks in advance.
>
>
>
>
>
>
>
>
>
>
> ---
> Outgoing mail is certified Virus Free, so am I.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.593 / Virus Database: 376 - Release Date: 20/02/2004
>
>
- Next message: JackRazz: "Re: .NET Control in Title Bar"
- Previous message: Ken Tucker [MVP]: "Re: Impersonation half way working"
- In reply to: starbuck: "keypress question"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|