Hi, I'm fairly new to Visual Basic (release 6) and having a bit of trouble with a tutorial I'm following - - Basically, I'm unsure of what is going on here, and wondering if someone could just explain this specific hunk of code:
My specific questions are:
1) What is the significance of the & after a variable? (stTime&) - I've also seen $ suffixing variables - what does this mean?
2) What exactly is going on with the line " SetTextColor .hdc, Color" ? I mean, the With statement is prefixing all calls to class objects with Parent ? So how exactly is this working? Should it not be Parent.(a given)hdc.SetTextColor = RED or whatever?
Many thanks for any assistance.
Code:
With Parent
Do
stTime& = GetTickCount()
SetTextColor .hdc, Color
TextOut .hdc, CurrentX, CurrentY, Caption, Len(Caption)
Do Until GetTickCount - stTime > Speed
DoEvents: If Not Scrolling Then Exit Sub
Loop
SetTextColor .hdc, GetBkColor(.hdc)
TextOut .hdc, CurrentX, CurrentY, Caption, Len(Caption)
SetNewPosition
DoEvents: If Not Scrolling Then Exit Sub
Loop
End With
1) What is the significance of the & after a variable? (stTime&) - I've also seen $ suffixing variables - what does this mean?
2) What exactly is going on with the line " SetTextColor .hdc, Color" ? I mean, the With statement is prefixing all calls to class objects with Parent ? So how exactly is this working? Should it not be Parent.(a given)hdc.SetTextColor = RED or whatever?
Many thanks for any assistance.