Hallo,
bin seit heute Registriert und bräuchte mal eure Hilfe.
Ich möchte das den Output eine zahl zugerechnet wird leider bekomme ich wenn ich das ausführe ein 0 im Label.
Hoffe Ihr könnt mir helfen.
lblgeld.Text = Outputb.ToString
lblpunkt.Text = Outputp.ToString
lblverbot.Text = Outputv.ToString
Hier ist der Gesamte Code für das Porgramm:
bin seit heute Registriert und bräuchte mal eure Hilfe.
Ich möchte das den Output eine zahl zugerechnet wird leider bekomme ich wenn ich das ausführe ein 0 im Label.
Hoffe Ihr könnt mir helfen.
lblgeld.Text = Outputb.ToString
lblpunkt.Text = Outputp.ToString
lblverbot.Text = Outputv.ToString
Hier ist der Gesamte Code für das Porgramm:
VB.NET-Quellcode
- Option Strict Off
- Public Class frm1
- Private Sub bt1_Click_1(sender As Object, e As EventArgs) Handles bt1.Click
- Dim input As Integer
- Dim Outputp As Integer
- Dim Outputb As Integer
- Dim Outputv As Integer
- input = CInt(Me.txtin.Text)
- Select Case input
- Case 1 To 10
- Outputb = 10
- Outputp = 0
- Outputv = 0
- Case 11 To 15
- Outputb = 20
- Outputp = 0
- Outputv = 0
- Case 16 To 20
- Outputb = 30
- Outputp = 0
- Outputv = 0
- Case 21 To 25
- Outputb = 70
- Outputp = 1
- Outputv = 0
- Case 26 To 30
- Outputb = 80
- Outputp = 1
- Outputv = 1
- Case 31 To 40
- Outputb = 120
- Outputp = 2
- Outputv = 1
- Case 41 To 50
- Outputb = 160
- Outputp = 2
- Outputv = 1
- Case 51 To 60
- Outputb = 240
- Outputp = 2
- Outputv = 1
- Case 61 To 70
- Outputb = 440
- Outputp = 2
- Outputv = 2
- Case Is > 70
- Outputp = 2
- Outputv = 3
- Outputb = 600
- End Select
- If Cbinn.Checked = True Then
- Select Case input
- Case 1 To 10
- Outputb = 30
- Outputp = 0
- Outputv = 0
- Case 11 To 15
- Outputb = 50
- Outputp = 0
- Outputv = 0
- Case 16 To 20
- Outputb = 70
- Outputp = 0
- Outputv = 0
- Case 21 To 25
- Outputb = 80
- Outputp = 1
- Outputv = 0
- Case 26 To 30
- Outputb = 100
- Outputp = 1
- Outputv = 1
- Case 31 To 40
- Outputb = 160
- Outputp = 2
- Outputv = 1
- Case 41 To 50
- Outputb = 200
- Outputp = 2
- Outputv = 1
- Case 51 To 60
- Outputb = 280
- Outputp = 2
- Outputv = 1
- Case 61 To 70
- Outputb = 480
- Outputp = 2
- Outputv = 2
- Case Is > 70
- Outputp = 2
- Outputv = 3
- Outputb = 680
- End Select
- End If
- End Sub
- Private Sub Bt2_Click(sender As Object, e As EventArgs)
- Dim Outputp As Integer
- Dim Outputb As Integer
- Dim Outputv As Integer
- If vbsek.Checked = True Then
- Outputb += 200
- Outputp += 2
- Outputv += 1
- ElseIf CKges.Checked = True Then
- Outputb += 320
- Outputp += 2
- Outputv += 1
- ElseIf cksachs.Checked = True Then
- Outputb += 360
- Outputp += 2
- Outputv += 1
- ElseIf cbeinfach.Checked = True Then
- Outputb += 90
- Outputp += 1
- Outputv += 1
- ElseIf CBgefahre.Checked = True Then
- Outputb += 320
- Outputp += 2
- Outputv += 1
- ElseIf CKVere.Checked = True Then
- Outputb += 360
- Outputp += 2
- Outputv += 1
- ElseIf cbpfei.Checked = True Then
- Outputb += 90
- Outputp += 2
- Outputv += 1
- End If
- lblgeld.Text = Outputb.ToString
- lblpunkt.Text = Outputp.ToString
- lblverbot.Text = Outputv.ToString
- End Sub
- End Class
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von „Genetic“ ()