Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
This code ensures that all the characters in a tex...
Author:
Gajendra Nagapurkar
E-mail:
Click to e-mail author
Submitted:
6/29/2002
Version:
VB5
Compatibility:
VB5, VB6
Category:
String Manipulation
Views:
12293
This code ensures that all the characters in a text box are uppercase even if you do not set the Caps Lock key.
Declarations:
'Place A text Box in a Form and name it as txt and copy this code in the Code window and check
Code:
Private Sub txt_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 97 KeyAscii = 65 Case 98 KeyAscii = 66 Case 99 KeyAscii = 67 Case 100 KeyAscii = 68 Case 101 KeyAscii = 69 Case 102 KeyAscii = 70 Case 103 KeyAscii = 71 Case 104 KeyAscii = 72 Case 105 KeyAscii = 73 Case 106 KeyAscii = 74 Case 107 KeyAscii = 75 Case 108 KeyAscii = 76 Case 109 KeyAscii = 77 Case 110 KeyAscii = 78 Case 111 KeyAscii = 79 Case 112 KeyAscii = 80 Case 113 KeyAscii = 81 Case 114 KeyAscii = 82 Case 115 KeyAscii = 83 Case 116 KeyAscii = 84 Case 117 KeyAscii = 85 Case 118 KeyAscii = 86 Case 119 KeyAscii = 87 Case 120 KeyAscii = 88 Case 121 KeyAscii = 89 Case 122 KeyAscii = 90 Case Else KeyAscii = 0 End Select End Sub
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2024 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement