Limit the entry of the keyboard,

xiaoxiao2021-03-06  40

Limit the entry of the keyboard, private sub txthandset_keypress (keyascii as integer) Keyasciiiii = isvalidtext (Keyascii, "-0123456789." TRUE) End Sub

Public Function isValidText (KeyIn As Integer, ValidateString As String, Editable As Boolean) As Integer 'dml add Dim ValidateList As String Dim KeyOut As Integer If Editable = True Then ValidateList = UCase (ValidateString) & Chr (8) Else ValidateList = UCase ( Validatestring) Endiffate, 1, Validatelist, ucase (Chr (Keyin)), 1)> 0 Then Keyout = Keyin Else Keyout = 0 Beep End IF ISVALIDTEXT = KEYOUTEND FUNCTION

转载请注明原文地址:https://www.9cbs.com/read-62912.html

New Post(0)