- Visual C++源码
- Visual Basic源码
- C++ Builder源码
- Java源码
- Delphi源码
- C/C++源码
- PHP源码
- Perl源码
- Python源码
- Asm源码
- Pascal源码
- Borland C++源码
- Others源码
- SQL源码
- VBScript源码
- JavaScript源码
- ASP/ASPX源码
- C#源码
- Flash/ActionScript源码
- matlab源码
- PowerBuilder源码
- LabView源码
- Flex源码
- MathCAD源码
- VBA源码
- IDL源码
- Lisp/Scheme源码
- VHDL源码
- Objective-C源码
- Fortran源码
- tcl/tk源码
- QT源码
cNumberTextBox.cls
资源名称:IE_VB.rar [点击查看]
上传用户:davilee3
上传日期:2015-04-22
资源大小:986k
文件大小:1k
源码类别:
浏览器
开发平台:
Visual Basic
- VERSION 1.0 CLASS
- BEGIN
- MultiUse = -1 'True
- Persistable = 0 'NotPersistable
- DataBindingBehavior = 0 'vbNone
- DataSourceBehavior = 0 'vbNone
- MTSTransactionMode = 0 'NotAnMTSObject
- END
- Attribute VB_Name = "cNumberTextBox"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = True
- Attribute VB_PredeclaredId = False
- Attribute VB_Exposed = False
- Option Explicit
- Private WithEvents mTextBox As TextBox
- Attribute mTextBox.VB_VarHelpID = -1
- Private mTextVal As Long
- Private Sub mTextBox_Change()
- mTextVal = Val(mTextBox.Text)
- End Sub
- Private Sub mTextBox_GotFocus()
- mTextBox.SelStart = 0
- mTextBox.SelLength = Len(mTextBox.Text)
- End Sub
- Private Sub mTextBox_KeyPress(KeyAscii As Integer)
- Dim tCanPress As Boolean
- tCanPress = KeyAscii >= 48 And KeyAscii <= 57
- tCanPress = tCanPress Or KeyAscii = 8
- If Not tCanPress Then
- KeyAscii = 0
- End If
- End Sub
- Public Property Let NumberTextBox(nTextBox As TextBox)
- Set mTextBox = nTextBox
- With nTextBox
- '.Alignment = vbRightJustify
- '.MaxLength = 9
- .Text = "1"
- '.FontName = "System"
- '.fontSize = "12"
- .Appearance = 0
- End With
- End Property
- Public Property Get NumberTextBox() As TextBox
- Set NumberTextBox = mTextBox
- End Property
- Public Property Get TextVal() As Long
- TextVal = mTextVal
- End Property