choudhmh
02-09-2008, 09:15 AM
Hi guys,
I'm using a scroll bar to increase values of numbers drawn using segments.
What i want is the value from the scroll to increase in mubers which is set by the text value. So when i scroll the scrollbar the values should move up by text value i.e. 2. I have thsi code but keep on getting errors - any help will be apprechiated.
Thanks:
Private Sub HScroll1_Change()
Dim txtToDisplay As String
txtToDisplay = (Format(HScroll1.Value / 100, "000.00") * text2.text)
ConverDigitToLCD Mid(txtToDisplay, 1, 1), Digit1
ConverDigitToLCD Mid(txtToDisplay, 2, 1), Digit2
ConverDigitToLCD Mid(txtToDisplay, 3, 1), Digit3
ConverDigitToLCD Mid(txtToDisplay, 5, 1), Digit5
ConverDigitToLCD Mid(txtToDisplay, 6, 1), Digit6
Text1.Text = txtToDisplay
End Sub
I'm using a scroll bar to increase values of numbers drawn using segments.
What i want is the value from the scroll to increase in mubers which is set by the text value. So when i scroll the scrollbar the values should move up by text value i.e. 2. I have thsi code but keep on getting errors - any help will be apprechiated.
Thanks:
Private Sub HScroll1_Change()
Dim txtToDisplay As String
txtToDisplay = (Format(HScroll1.Value / 100, "000.00") * text2.text)
ConverDigitToLCD Mid(txtToDisplay, 1, 1), Digit1
ConverDigitToLCD Mid(txtToDisplay, 2, 1), Digit2
ConverDigitToLCD Mid(txtToDisplay, 3, 1), Digit3
ConverDigitToLCD Mid(txtToDisplay, 5, 1), Digit5
ConverDigitToLCD Mid(txtToDisplay, 6, 1), Digit6
Text1.Text = txtToDisplay
End Sub