第二的问题:
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
SendKeys "{TAB}"
End If
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
SendKeys "{TAB}"
End If
End Sub
Dim i As Integer, temp As String
If Val(Mid(Str(OriginValue), Len(Str(OriginValue)) - ProcessBit, 1)) > 5 Then
temp = Left(Str(OriginValue), Len(Str(OriginValue)) - ProcessBit - 1) & Str(Val(Mid(Str(OriginValue), Len(Str(OriginValue)) - ProcessBit - 1, 1)) + 1)
For i = 1 To ProcessBit
temp = temp & "0"
Next
NumericProcess = Val(temp)
Else
temp = Left(Str(OriginValue), Len(Str(OriginValue)) - ProcessBit)
For i = 1 To ProcessBit
temp = temp & "0"
Next
NumericProcess = CLng(temp)
End If
End Function刚刚临时写的,没有测试哦~2、有点困难,看起来要用Hook3、将它转换成String(Str()),然后用Left()控制它的长度,再用Clng()转换成Long就行了。
Public Function MyInt(Value as Double)as Long
MyInt=Int(Value + 0.5)
End Function
格式:round (<数值>,[精确到第几位])
看看VB的帮助
2。同意二楼的意见。