Thaks man that will save some time on my end. I hate dealing with strings lol.
The interesting part is :
93 0.00181072 VB6.EXE IRP_MJ_WRITE VCP0 SUCCESS Length 20: 12345678901234567890
which shows success. This means, it leaves your PC without problems. So I guess the problem is with the VFD.
You might try to slow down the transmisson and set it to 9600 baud.
The other way is:
Code:Dim Msg As String Dim i As Integer Msg = "1234567890abcdefghijk" For i = 1 To Len(Msg) vfdCom.Output Mid(Msg, i, 1) Next
Skinning to go... VisualDesigner2!
Thaks man that will save some time on my end. I hate dealing with strings lol.
Well I got all the worked out thanks to you guys. Would any of you super vb people like to help me figure out how to make a trackbar sub? Basicly it would look like this:
: ~ :
and of corse this tilda would move along with the track bar in winamp. I just got to figure out a way to make a sub to crate the graph when it needs to be updated (ie: when the song has moved far enough along that the tilda needs to move a block over).
I'm not a VB guy, but can do math.![]()
' width would be the width of the display
width = 10
' position and duration of song in seconds, converted to 0-9 range
pos = position * width / duration
' don't update unless it changed
if(pos = lastpos) then return
lastpos = pos
' make a 10 char string with the ~ somewhere in the middle
Dim str
str = String(pos, " ") + "~" + String(width - pos - 1, " ")
Well, okay that's a starting point at least.
Thanks thats a good start. Of corse the little bar I made on here the forums removed the extra spaces :/ oh well I think you got the jist of it. Now off toto refine it.
Try this:
About time to buy yourself a good bookCode:Sub DrawBar() Dim Bar As String Dim i As Integer Dim Pos as Integer Bar = ":------------------:" Pos = CalcPos Mid(Bar, Pos, 1) = "~" For i = 1 To Len(Bar) vfdCom.Output Mid(Bar, i, 1) Next End Sub Function CalcPos() As Integer CalcPos = 4 'calc the pos and return an integer between 2 and 18 End Function![]()
Skinning to go... VisualDesigner2!
Thanks man. Don't worie you will all get credit in the software for the help. I have a bunch of vb books but I am at work and don't have them on hand for referance.
Well this is what I ended up with:
I'm guessing some thing is off sence i had to use an if statment to get it to display from 2-19. I can clean up those if statments a bit but I was wondering what I have wrong in there that would make the if statments needed?Code:Sub DrawBar() Dim Bar As String Dim i As Integer Dim pos As Integer Bar = ":------------------:" pos = CalcPos If pos = 0 or pos = 1 Then Mid(Bar, pos + 1, 1) = ">" Else Mid(Bar, pos, 1) = ">" End If For i = 1 To Len(Bar) vfdCom.Output = Mid(Bar, i, 1) Next End Sub Function CalcPos() As Integer Dim length As Long Dim position As Long Dim x As Integer WinAMP_FindWindow length = WinAMP_GetTrackLength() position = WinAMP_GetTrackPosition() x = position * 19 / length CalcPos = x 'calc the pos and return an integer between 2 and 18 End Function
My bad. I was thinking 0-based and missed the colons. So just change the math to...
x = 2 + (position * 18 / length)
Zorro, I think I need to buy me a good book too!![]()
A good book never failes
![]()
Skinning to go... VisualDesigner2!
Bookmarks