Re: keypress question

From: Ken Tucker [MVP] (vb2ae_at_bellsouth.net)
Date: 02/24/04


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
>
>



Relevant Pages

  • Re: Some interesting facts
    ... Upper and lower case letters are named 'upper' and 'lower' because ... Well I won't be writing any poems tonight. ... of celery than the celery has in it to begin with. ...
    (alt.vacation.las-vegas)
  • Some interesting facts
    ... Money isn't made out of paper, ... Upper and lower case letters are named 'upper' and 'lower' because ... of celery than the celery has in it to begin with. ...
    (alt.vacation.las-vegas)
  • Re: letter number count
    ... D1:D26 - key in upper case alphabet - a through z ... First calculation you gave me was for figuring occurences of A-Z and 0-9 ... Valko" wrote: ... also wanted to add lowercase letters (just three lowercase letters a,e, & ...
    (microsoft.public.excel.worksheet.functions)
  • Re: letter number count
    ... Thanks for the upper and lower case explanation, ... First calculation you gave me was for figuring occurences of A-Z and 0-9 ... Valko" wrote: ... also wanted to add lowercase letters (just three lowercase letters a,e, & ...
    (microsoft.public.excel.worksheet.functions)
  • Re: The case for lower case
    ... both pure lower and upper case tend to slow down ... > Lower case letters contain more visual "information" than upper case ... > and cover up the top half of a row of all upper case characters. ... black background more pleasing than other combinations. ...
    (alt.lang.asm)