0
0

Here’s a vbcode good for your spectrum fall off delay…
put progressbar in your form and in its properties select index column and enter 1 for creating array then create timer control and type code as below:

Private FallOffDelay as integer

Private Sub Form_Load()
FallOffDelay = 2
For i = 2 To 31
Load Progressbar1(i)
Progressbar1(i).Visible = True
Progressbar1(i).Left = (Progressbar1(i – 1).Left + 135)
Next
Timer1.Enabled = True
End Sub

Private Sub Timer1_Timer()
‘ Put this to get spectrum values
Static Spec(511) As Single
Dim Specount As Long, Ypec(511) As Long
Call GetSpectrum(Spec())
For Specount = 0 To 511
Ypec(Specount) = Int(Spec(Specount) * 650) + 1
Next
‘ Begin Processing values to progressbars
For i = 1 To 31
If Progressbar(i).value < Ypec(i) Then
Progressbar(i).value = Ypec(i)
End If
If Progressbar(i).value > Ypec(i) Then
Progressbar(i).value = Progressbar(i).value – FallOffDelay
End If
Next
End Sub

That’s it!

  • You must to post comments
0
0

sorry i forgot to mention to keep Timer1’s interval to 1

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.