Hi Forum
since Friday Im trying to figure out that F*** homework:
1. change 4 colours at certain interval
2. start the changes with Command Button 1
3. stop the changes with Command Button 2
4. Interval should be variable (TextBox 1)
and if I configure it so, that this interval will be Xtimes longer (probably Text Box2) I will get extra points from our sadist teacher.
until now I have that rubbish:
Quote:
Private Sub Command1_Click()
Picture1.BackColor = RGB(0, 0, 0)
End Sub
Private Sub Form_Load()
Text1.Text = ""
Timer1.Interval = Val(Text1.Text)
End Sub
Private Sub Picture1_Click()
End Sub
Private Sub Text1_Change()
If Text1.Text > "0" Then
Command1.Enabled = True
Else
Command1.Enabled = False
End If
If Text1.Text > "0" Then
Timer1.Enabled = True
Else
Timer1.Enabled = False
End If
End Sub
Private Sub Timer1_Timer()
If Picture1.BackColor = RGB(0, 0, 0) Then
Picture1.BackColor = RGB(0, 0, 200)
Else
Picture1.BackColor = RGB(0, 0, 0)
End If
End Sub
|
When I write in the
Quote:
Private Sub Form_Load()
Text1.Text = ""
Timer1.Interval = Val(Text1.Text)
End Sub
|
Text1.Text = "" it doesnt work, but when I type Text1.Text = 100 the colours changes.
PLS can someone helps me?