0% found this document useful (0 votes)
58 views3 pages

Scroll Timer: Private Sub Command1 - Click

This document contains code for a scroll timer application. The application contains a horizontal scroll bar to set the tempo, two circle shapes that change color on a timer to act as a metronome, and three command buttons. Clicking the first button starts the timer using the scroll value as the interval. Clicking the second button stops the timer. The timer event changes the fill style of the two circles to toggle their color and act as the metronome clicking sound.

Uploaded by

Ariel Wilka
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views3 pages

Scroll Timer: Private Sub Command1 - Click

This document contains code for a scroll timer application. The application contains a horizontal scroll bar to set the tempo, two circle shapes that change color on a timer to act as a metronome, and three command buttons. Clicking the first button starts the timer using the scroll value as the interval. Clicking the second button stops the timer. The timer event changes the fill style of the two circles to toggle their color and act as the metronome clicking sound.

Uploaded by

Ariel Wilka
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Scroll Timer

Setting OBjek : catatan Atur Huruf / font 12


Objek
Form1
Shape1
Shape2
Timer
Label1
HScroll1

Command1
Command2
Command3

Property
Caption
Shape
FillColor
FillStyle
Shape
FillColor
FillStyle
Enabled
Caption
Min
Max
SmallChange
LargeChange
Value
Caption

Private Sub Command1_Click()

Value
Metronome
3 ( Circle)
Red
1
3 ( Circle)
Red
1
False
none
40
220
1
10
40
Go
Stop
End

Dim Tempo As Single


Tempo = HScroll1.Value
Timer1.Interval = 60 * (1000 / Tempo)
Timer1.Enabled = True
End Sub
Private Sub Command2_Click()
Timer1.Enabled = False
End Sub
Private Sub Command3_Click()
End
End Sub
Private Sub Form_Load()
Label1.Caption = Str(HScroll1.Value)
End Sub
Private Sub HScroll1_Change()
Label1.Caption = Str(HScroll1.Value)
End Sub
Private Sub Timer1_Timer()
'Beep
If (Shape1.FillStyle = 0) Then
Shape1.FillStyle = 1
Shape2.FillStyle = 0
Else
Shape1.FillStyle = 0
Shape2.FillStyle = 1
End If
End Sub

You might also like