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
Control Date Input
Author:
Mark S
Submitted:
3/9/2007
Version:
VB.NET 2003
Compatibility:
VB.NET 2003, VB 2005
Category:
Date/Time
Views:
20197
This Code is to control input for Date on the keypress.
Declarations:
'none
Code:
Private Sub txtboxDate_KeyPress(ByVal sender As Object, ByVal e _ As System.Windows.Forms.KeyPressEventArgs) Handles txtboxDate.KeyPress 'KeyPress input controlled by ASCII. Do nothing 'if these Ascii Ranges are keypress Select Case e.KeyChar() Case ChrW(0) To ChrW(7) 'Null to Audible bell e.KeyChar = Nothing Case ChrW(9) To ChrW(46) 'Horizontal Tab to Period. e.KeyChar = Nothing Case ChrW(58) To ChrW(255) 'Semicolen to Empty Square e.KeyChar = Nothing End Select
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2024 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement