Kan iemand mij hiermee helpen? mijn wekker moet als er spaghetti staat vanaf 6 sec aftellen , bij rijst 10 en ei 15.
dit heb ik al. alvast bedankt!Option Explicit
Const kooktijdspaghetti = 6 * 60
Const kooktijdrijst = 15 * 60
Const kooktijdeihardgekookt = 10 * 60
Dim aantalseconden As Integer
Dim kooktijd As Integer
Dim aantalminuten As Integer
dit heb ik al. alvast bedankt!Option Explicit
Const kooktijdspaghetti = 6 * 60
Const kooktijdrijst = 15 * 60
Const kooktijdeihardgekookt = 10 * 60
Dim aantalseconden As Integer
Dim kooktijd As Integer
Dim aantalminuten As Integer
Code:
Private Sub CmdEnd_Click()
End
End Sub
Private Sub CmdStart_Click()
TmrKooktijd.Enabled = True
If CboProdukt.Text = "Spaghetti" Then pctspaghetti.Visible = True
If CboProdukt.Text = "Rijst" Then pctrijst.Visible = True
If CboProdukt.Text = "Ei" Then pctei.Visible = True
If CboProdukt.Text = "spaghetti" Then TmrKooktijd.Enabled = True
If CboProdukt.Text = "rijst" Then TmrKooktijd.Enabled = True
If CboProdukt.Text = "ei" Then TmrKooktijd.Enabled = True
Select Case kooktijd
Case 0
If CboProdukt.Text = "spaghetti" Then LblMinuten.Caption = "6"
End Select
End Sub
Private Sub Form_Load()
CboProdukt.AddItem "Spaghetti"
CboProdukt.AddItem "Rijst"
CboProdukt.AddItem "Ei"
End Sub
Private Sub TmrKooktijd_Timer()
LblSeconden.Caption = LblSeconden.Caption - 1
aantalminuten = aantalminuten - 1
LblMinuten.Caption = LblMinuten.Caption - 1
LblMinuten.Caption = LblSeconden.Caption / 100
End Sub
Laatst bewerkt door een moderator: