I need to add a time limit to display in a label that counts down in every form that I have.
For example once you start the game the timer will begin and you will be able to see in the top right corner. Once the user clicks next the time from that form will carry over from the next.
Just some hints on how to do this would be great. I want a 10 Minute time limit.
Public Class question6Form
Private Sub wordComboBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles wordComboBox.SelectedIndexChanged
wordListBox.Items.Add(wordComboBox.SelectedItem)
End Sub
Private Sub nextButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles nextButton.Click
'data validation
If wordListBox.Items.Count > 4 Then
MessageBox.Show("Cannot use more than 4 words", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
Else
question7Form.ShowDialog()
End If
'checks for alphabetization
If wordListBox.Items(0) = "Kempthorn" And wordListBox.Items(1) = "Kensington" And wordListBox.Items(2) = "Kentfield" And wordListBox.Items(3) = "Kirkwood" Then
mainForm.scoreInteger = mainForm.scoreInteger + 20
Else
mainForm.scoreInteger = mainForm.scoreInteger - 5
End If
End Sub
Private Sub clearButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles clearButton.Click
'clears listbox
wordListBox.Items.Clear()
End Sub
Private Sub question6Form_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
question5Form.Hide()
This is just some code from my 6th question. Just not sure what to use, time or counter and how to go about making it 10 minutes.
Thanks ahead of time if this is really simple which I'm sure it is. I just couldn't find any code snippets or help.

New Topic/Question
Reply




MultiQuote






|