Please help me. I need to do this program that every time the users enter any numbers, those numbers shows in a lable digit per digit. Here is an example
Users enter 12345
the computer shows that number in five different labels as:
1 2 3 4 5
I have this code but, the result in giving me as decimal. I do not want decimal. I want integer. Here is my code
2007-02-23
03:40:08
·
3 answers
·
asked by
yo m
1
in
Computers & Internet
➔ Programming & Design
Public Class frmDigitExtractor
Private Sub lblExtractDigit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lblExtractDigit.Click
End Sub
Private Sub btnEnter_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEnter.Click
Dim fifth As Integer
Dim fourth As Integer
Dim third As Integer
Dim second As Integer
Dim first As Integer
fifth = lbl5.Text
fourth = lbl4.Text
third = lbl3.Text
second = lbl2.Text
first = lbl1.Text
lbl5.Text = fifth Mod 10
lbl4.Text = fifth / 10 Mod 10
lbl3.Text = fifth / 100 Mod 10
lbl2.Text = fifth / 1000 Mod 10
lbl1.Text = fifth / 10000 Mod 10
2007-02-23
03:40:57 ·
update #1
Private Sub txtInput_TextChanged(ByVal sender As System.Object , ByVal e As System.EventArgs) Handles txtInput.TextChanged
End Sub
Private Sub lbl5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lbl5.Click
End Sub
Private Sub lbl4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lbl4.Click
End Sub
Private Sub lbl3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lbl3.Click
End Sub
Private Sub lbl2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lbl2.Click
End Sub
Private Sub lbl1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lbl1.Click
End Sub
End Class
2007-02-23
03:41:11 ·
update #2