Public Class Form1
Private Sub PictureBox7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox7.Click
End Sub
Private Sub ShowDigit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ShowDigit.Click
Dim Digit1 As Integer = DigitValue.Text
If Digit1 = 0 Then
PictureBox1.Visible = True
PictureBox2.Visible = True
PictureBox3.Visible = True
PictureBox5.Visible = True
PictureBox6.Visible = True
PictureBox7.Visible = True
PictureBox4.Visible = False
End If
If Digit1 = 1 Then
PictureBox1.Visible = True
PictureBox2.Visible = True
PictureBox3.Visible = True
PictureBox5.Visible = True
PictureBox6.Visible = True
PictureBox7.Visible = True
PictureBox4.Visible = False
End If
If Digit1 = 2 Then
PictureBox1.Visible = True
PictureBox2.Visible = True
PictureBox3.Visible = True
PictureBox5.Visible = True
PictureBox6.Visible = True
PictureBox7.Visible = True
PictureBox4.Visible = False
End If
If Digit1 = 3 Then
PictureBox1.Visible = True
PictureBox2.Visible = True
PictureBox3.Visible = True
PictureBox5.Visible = True
PictureBox6.Visible = True
PictureBox7.Visible = True
PictureBox4.Visible = False
End If
If Digit1 = 4 Then
PictureBox1.Visible = True
PictureBox2.Visible = True
PictureBox3.Visible = True
PictureBox5.Visible = True
PictureBox6.Visible = True
PictureBox7.Visible = True
PictureBox4.Visible = False
End If
If Digit1 = 5 Then
PictureBox1.Visible = True
PictureBox2.Visible = True
PictureBox3.Visible = True
PictureBox5.Visible = True
PictureBox6.Visible = True
PictureBox7.Visible = True
PictureBox4.Visible = False
End If
If Digit1 = 6 Then
PictureBox1.Visible = True
PictureBox2.Visible = True
PictureBox3.Visible = True
PictureBox5.Visible = True
PictureBox6.Visible = True
PictureBox7.Visible = True
PictureBox4.Visible = False
End If
If Digit1 = 7 Then
PictureBox1.Visible = True
PictureBox2.Visible = True
PictureBox3.Visible = True
PictureBox5.Visible = True
PictureBox6.Visible = True
PictureBox7.Visible = True
PictureBox4.Visible = False
End If
DigitValue.Text = DigitValue.Text + 1
OneSecs.Text = OneSecs.Text + 1
End Sub
Private Sub AddOne_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AddOne.Click
ShowDigit_Click(sender, e)
If DigitValue.Text > 9 Then
DigitValue.Text = "0"
End If
End Sub
Private Sub ShowDigit2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ShowDigit2.Click
Dim Digit As Integer = OneSecs.Text
If Digit = 0 Then
PictureBox8.Image = Image.FromFile("C:\Users\Zafeer Hussain\Desktop\0.jpg")
End If
If Digit = 1 Then
PictureBox8.Image = Image.FromFile("C:\Users\Zafeer Hussain\Desktop\1.jpg")
End If
If Digit = 2 Then
PictureBox8.Image = Image.FromFile("C:\Users\Zafeer Hussain\Desktop\2.jpg")
End If
If Digit = 3 Then
PictureBox8.Image = Image.FromFile("C:\Users\Zafeer Hussain\Desktop\3.jpg")
End If
If Digit = 4 Then
PictureBox8.Image = Image.FromFile("C:\Users\Zafeer Hussain\Desktop\4.jpg")
End If
If Digit = 5 Then
PictureBox8.Image = Image.FromFile("C:\Users\Zafeer Hussain\Desktop\5.jpg")
End If
If Digit = 6 Then
PictureBox8.Image = Image.FromFile("C:\Users\Zafeer Hussain\Desktop\6.jpg")
End If
If Digit = 7 Then
PictureBox8.Image = Image.FromFile("C:\Users\Zafeer Hussain\Desktop\7.jpg")
End If
If Digit = 8 Then
PictureBox8.Image = Image.FromFile("C:\Users\Zafeer Hussain\Desktop\8.jpg")
End If
If Digit = 9 Then
PictureBox8.Image = Image.FromFile("C:\Users\Zafeer Hussain\Desktop\9.jpg")
End If
End Sub
Private Sub OneSecs_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OneSecs.TextChanged
End Sub
Private Sub ShowDigit3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ShowDigit3.Click
Dim Digit As Integer = TenSecs.Text
If Digit = 1 Then
PictureBox. = ("H:\VBCode\DigitalTimer\1.jpg")
End If
End Sub
End Class
Can anyone distinguish the problem I can't seem to?? :s
Also how would I finish off the code in ShowDigit3 so it shows the correct picture image for any number 0-9 in TenSecs??

New Topic/Question
Reply



MultiQuote




|