KeyCode Constants !

KeyCode Constants !

Post by Jake Mar » Fri, 07 Apr 2000 04:00:00



Yes, just use code like this, and make sure the Form's KeyPreview property
is set to True.  Forget about finding a constant - just use the 39.  Another
option would be to check if KeyAscii = Asc("'"), which will also evaluate to
39.

Private Sub Form_KeyPress(KeyAscii As Integer)
    If KeyAscii = 39 Then
        Interaction.Beep
        KeyAscii = 0
    End If
End Sub

Regards,
Jake Marx


> Well...vbKeyright is for Right Arrow Key...
> I am still stuck...
> Is there any other way for blocking a particular key for
> an entire form...
> I need to block the single quote ie the apostrophe key...
> I don't want to sit and write code for
> each textbox..its too cumbersome...

> Vikram



> > If 39 is the code, it matches the keycode constant of vbKeyRight.

> > --
> > Patrick Logan, MCSD
> > Senior Technical Development Advisor
> > McKessonHBOC -- Extended Care Solutions Group

> > Opinions expressed are my own and not necessarily those of McKessonHBOC.

 
 
 

KeyCode Constants !

Post by Vikra » Sat, 08 Apr 2000 04:00:00


I need the Keycode constant for the apostrophe key.
I am using the KeyPreview Property and the KeyDown Event
to block that key...Apostrophe(Single Quote) is an illegal character in my
s/w and
I need to block it ~!

Vikram

 
 
 

KeyCode Constants !

Post by Vikra » Sat, 08 Apr 2000 04:00:00


Well...vbKeyright is for Right Arrow Key...
I am still stuck...
Is there any other way for blocking a particular key for
an entire form...
I need to block the single quote ie the apostrophe key...
I don't want to sit and write code for
each textbox..its too cumbersome...

Vikram


> If 39 is the code, it matches the keycode constant of vbKeyRight.

> --
> Patrick Logan, MCSD
> Senior Technical Development Advisor
> McKessonHBOC -- Extended Care Solutions Group

> Opinions expressed are my own and not necessarily those of McKessonHBOC.

 
 
 

KeyCode Constants !

Post by Vikra » Sat, 08 Apr 2000 04:00:00


Thanks A Lot...Works Real Fine !
Problem Solved.Mission Accomplished !
- Vikram


> Yes, just use code like this, and make sure the Form's KeyPreview property
> is set to True.  Forget about finding a constant - just use the 39.
Another
> option would be to check if KeyAscii = Asc("'"), which will also evaluate
to
> 39.

> Private Sub Form_KeyPress(KeyAscii As Integer)
>     If KeyAscii = 39 Then
>         Interaction.Beep
>         KeyAscii = 0
>     End If
> End Sub

> Regards,
> Jake Marx



> > Well...vbKeyright is for Right Arrow Key...
> > I am still stuck...
> > Is there any other way for blocking a particular key for
> > an entire form...
> > I need to block the single quote ie the apostrophe key...
> > I don't want to sit and write code for
> > each textbox..its too cumbersome...

> > Vikram



> > > If 39 is the code, it matches the keycode constant of vbKeyRight.

> > > --
> > > Patrick Logan, MCSD
> > > Senior Technical Development Advisor
> > > McKessonHBOC -- Extended Care Solutions Group

> > > Opinions expressed are my own and not necessarily those of
McKessonHBOC.

 
 
 

1. Detect "Enter" keycode in data

Hi

I've a VARCHAR column that corresponds with multi-line textbox. The problem
is that I need to extract the data into a textfile as a single line text but
there are "Enter" key in the data causing the extracted line to be
multi-line too. Is there any method to detect those "Enter" key in the data?

Thx

2. How can I execute Oracle stored procedures?

3. Find keycode of installed sql server

4. drop-down edit problem

5. Cannot find KeycodeV2.dll, or invalid keycode error at Crystal Reports

6. Searching a TEXT datatype which may contain wildcard characters.

7. keycode

8. IE and OLAP Error - ATT: MICROSOFT

9. User Defined Function as a constant

10. MSSQL7 Constants

11. Managing Constants

12. SQL_DRIVER_PROMPT and other constants