one way, is to use 2 picture boxes and BitBlt.
steps:
In the timer subroutine:
1. the first picture box has the label in it and in the timer the label is moved to the left like you already have.
2. now use the print statement to print the text directly onto the picture box (using the position of the label as the coordinates for printing the text onto the picture box)
3. use BitBlt to copy the picture box onto which you just printed text to the other picture box, and this will stop the flicker.
4. Hide the picture box with the label in it (it will flicker) so that you only see smooth scrolling text in the BitBlted picture box.
Here are the declarations and an example of using BitBlt to copy from one picture box to the other.
Code:Private Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long Private Const SRCCOPY = &HCC0020 BitBlt Picture1.hDC, 0, 0, Picture1.ScaleWidth, Picture1.ScaleHeight, Picture2.hDC, 0, 0, SRCCOPY




Reply With Quote