| | |
About Progress Bar
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
![]() |
Hi To all,i used progress bar control of 7 array i.e 0 to 7 ProgressBar(PB) with same name pb1 ,but how to write code for each .My code is working if i select 1 PB and there is any other event for pb that i should not click on pb it directly retrieve data from port ,thus we can load pb in a Form load which on loading it directly retrieve data.
Pls hlp in this. And i want to use array for storing data and recieving data that if i storing data from array 0 to 15 .so, if i store some command on 0th element of array that will trigger to the port and if any reply from port then it will store on the 0th element of the array and keep some timeout between this elements to retrieve and send .And can we keep this structure in a loop that we have not to press any key for it to start that it will start during form load.
Pls hlp in this. And i want to use array for storing data and recieving data that if i storing data from array 0 to 15 .so, if i store some command on 0th element of array that will trigger to the port and if any reply from port then it will store on the 0th element of the array and keep some timeout between this elements to retrieve and send .And can we keep this structure in a loop that we have not to press any key for it to start that it will start during form load.
•
•
Join Date: May 2007
Posts: 7
Reputation:
Solved Threads: 1
•
•
•
•
Hi To all,i used progress bar control of 7 array i.e 0 to 7 ProgressBar(PB) with same name pb1 ,but how to write code for each .My code is working if i select 1 PB and there is any other event for pb that i should not click on pb it directly retrieve data from port ,thus we can load pb in a Form load which on loading it directly retrieve data.
pb1(x).value = value
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
pb1(3).value = 50
pb1(x).width = value
For x = 0 to 7
pb1(x).value = value
Next xsomething = pb1(x).value
•
•
Join Date: Aug 2006
Posts: 20
Reputation:
Solved Threads: 1
Double is the equivalent for float
Here is the way to do that
Sub Convert2_Dbl()
Dim Recieved_data As Integer
Dim batt_voltage As Double
Recieved_data = 2
batt_voltage = CDbl(Recieved_data * 0.0390625)
End Sub
Here is the way to do that
Sub Convert2_Dbl()
Dim Recieved_data As Integer
Dim batt_voltage As Double
Recieved_data = 2
batt_voltage = CDbl(Recieved_data * 0.0390625)
End Sub
Thank u shasur this is code which iam using to send data and recieved dzta from port .what data coming from port is in AAA,EEE,LLL like this i want to use this value with the above formula it is not converting to integer ,string ,decimal
Dim ByteToSend(0 To 6) As Byte
Dim Buffer As Variant
Dim datain As Variant 'this is my recieved data
Dim dummy As String
Dim Battery As Double
Dim intdata As Variant
ByteToSend(0) = &H64 'Text5.Text
ByteToSend(1) = &H64 'Text5.Text
ByteToSend(2) = &H64 'Text5.Text
'ByteToSend(3) = &H64
'ByteToSend(4) = &H64
'ByteToSend(5) = &H61
Buffer = ByteToSend()
MSComm1.Output = Buffer
Do
dummy = DoEvents
Loop Until MSComm1.InBufferCount > 2
datain = MSComm1.Input
intdata = datain 'it giving 0 intdata
Debug.Print intdata
Battery = CDbl(intdata * 0.0390625)
ProgressBar4.Value = Val(Asc(Mid$(Battery, 1, 2)))'here it not display in the progess bar not even it text.
Text10.Text = Val(Asc(Mid$(Battery, 1, 2)))
thanxz for reply i will wait for u r rply thanx.
Dim ByteToSend(0 To 6) As Byte
Dim Buffer As Variant
Dim datain As Variant 'this is my recieved data
Dim dummy As String
Dim Battery As Double
Dim intdata As Variant
ByteToSend(0) = &H64 'Text5.Text
ByteToSend(1) = &H64 'Text5.Text
ByteToSend(2) = &H64 'Text5.Text
'ByteToSend(3) = &H64
'ByteToSend(4) = &H64
'ByteToSend(5) = &H61
Buffer = ByteToSend()
MSComm1.Output = Buffer
Do
dummy = DoEvents
Loop Until MSComm1.InBufferCount > 2
datain = MSComm1.Input
intdata = datain 'it giving 0 intdata
Debug.Print intdata
Battery = CDbl(intdata * 0.0390625)
ProgressBar4.Value = Val(Asc(Mid$(Battery, 1, 2)))'here it not display in the progess bar not even it text.
Text10.Text = Val(Asc(Mid$(Battery, 1, 2)))
thanxz for reply i will wait for u r rply thanx.
![]() |
Similar Threads
- progress bar (Visual Basic 4 / 5 / 6)
- progress bar problem in vb (Visual Basic 4 / 5 / 6)
- an animated STATUS BAR, or PROGRESS BAR, (Community Introductions)
- Javascript Progress Bar flickers (JavaScript / DHTML / AJAX)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Automate Microsoft Word From VB6
- Next Thread: Can anyone help?
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age append application basic beginner birth bmp calculator cd cells.find click client code college column component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report retrieve save search sendbyte sites sort sql sql2008 sqlserver subroutine table tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





