|
-
Jun 24th, 2001, 02:02 AM
#1
Thread Starter
New Member
flickering
i am tryin to have a message scroll across the screen in my program. i've got the scrolling part down pat (i think) but it seem that i can't get the blasted thing to stop flickering as it moves. i tried the no-flicking API code in the Code section, but that didn't work at all. any help?
[ aeon ][ outershell.net ]
-
Jun 24th, 2001, 03:06 AM
#2
Registered User
To do this make two picture boxes. Set the first picturebox's autoredraw to true and visible to false. Then print the text onto the picturebox that is hidden. Then bitblt the text onto a second visible picturebox.
Clear the picturebox each time as you scroll, reprint the text and bitblt it again. Welll you get the idea.
-
Jun 24th, 2001, 03:15 AM
#3
Thread Starter
New Member
i get the concept, but how do i bitblt (i'm almost totally inexperienced at graphics in windows)?
[ aeon ][ outershell.net ]
-
Jun 24th, 2001, 03:26 AM
#4
Registered User
It is very easy, here is the code to do it :
VB 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
-
Jun 24th, 2001, 04:14 AM
#5
Thread Starter
New Member
thanks a lot, that did the trick.
[ aeon ][ outershell.net ]
-
Jun 24th, 2001, 04:16 AM
#6
Registered User
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|