Results 1 to 6 of 6

Thread: flickering

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2001
    Posts
    4

    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 ]

  2. #2
    Registered User Nucleus's Avatar
    Join Date
    Apr 2001
    Location
    So that's what you are up to ;)
    Posts
    2,530
    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.

  3. #3

    Thread Starter
    New Member
    Join Date
    Jun 2001
    Posts
    4
    i get the concept, but how do i bitblt (i'm almost totally inexperienced at graphics in windows)?
    [ aeon ][ outershell.net ]

  4. #4
    Registered User Nucleus's Avatar
    Join Date
    Apr 2001
    Location
    So that's what you are up to ;)
    Posts
    2,530
    It is very easy, here is the code to do it :
    VB Code:
    1. 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
    2. Private Const SRCCOPY = &HCC0020
    3.  
    4. BitBlt Picture1.hDC, 0, 0, Picture1.ScaleWidth, Picture1.ScaleHeight, Picture2.hDC, 0, 0, SRCCOPY

  5. #5

    Thread Starter
    New Member
    Join Date
    Jun 2001
    Posts
    4
    thanks a lot, that did the trick.
    [ aeon ][ outershell.net ]

  6. #6
    Registered User Nucleus's Avatar
    Join Date
    Apr 2001
    Location
    So that's what you are up to ;)
    Posts
    2,530
    Nice.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width