01.
Private
Sub
TextQTY_KeyPress(
ByVal
sender
As
Object
,
ByVal
e
As
System.Windows.Forms.KeyPressEventArgs)
Handles
txtQTY.KeyPress
02.
If
txtQTY.Text =
""
Then
03.
Dot =
True
04.
Sum = 0
05.
DotPoint = 0
06.
End
If
07.
If
(e.KeyChar =
"."
)
And
Dot
Then
08.
Dot =
False
09.
Else
10.
If
((e.KeyChar <
"0"
)
Or
(e.KeyChar >
"9"
))
And
(e.KeyChar <>
""
)
Then
11.
e.Handled =
True
12.
End
If
13.
If
Key = 8
Or
Key = 46
Then
14.
If
Sum <> 0
Then
15.
Sum = Sum - 1
16.
If
DotPoint = Sum
Then
Dot =
True
17.
End
If
18.
Else
19.
Sum = Sum + 1
20.
If
Key = 110
Then
21.
DotPoint = Sum
22.
End
If
23.
End
If
24.
End
If
25.
End
Sub