Results 1 to 3 of 3

Thread: Transparent - Flicker-free scrolling text

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2001
    Location
    Delhi
    Posts
    1

    Exclamation Transparent - Flicker-free scrolling text

    I am making a marquee desktop application in VB...

    The requirement is,
    I hv a configuration form, on which the user has the options to decide different

    parameters(i.e. select the picture,select the direction of scrolling the text....left to

    right....right to left....top to bottom etc.,center,stretch,tile options for backgroung image

    etc.)
    The user can define the text of his own from configuration form....he can change it anytime.

    When he decides to execute the marquee....a second form...without the top bar is displayed,

    having the background picture and the text scrolling in the direction , he selected.

    The problem is,
    1>We have to keep the control containing the text, transparent so that the whole area around

    the text is transparent showing the picture beneath it and also move it in the direction

    specified by the user.

    Now if I put the text in the label control...I can make it transparent...but when I move it

    on the screen with the help of timer...then it has a lot of flicker.

    If I use the textbox control to display the text...and move it then there is no flicker but

    it is not transparent..I mean the text is displayed in an opaque rectangular strip....

    BitBlt API is used in animations to remove flicker in VC & VB, using the concept of back

    buffering...but it requires hDC (handle of device context)...which is not present for the

    Label (i.e. Graphic) control.

    Second method I came to know is using double buffering thro' OpenGL programming...but I don't

    know how to program it and whether the problem can really be solved by this method.

    The solution can be in any language as far as we can make a DLL of it so that it can be

    called in VB thro' API.

    2>The same flicker problem is there when I tile the background picture with the help of

    PaintPicture method and the Picturebox control containing the picture to be tiled and then scroll

    the label control.

    Hope somebody can give me any solution.....
    Pravesh

  2. #2
    Zaei
    Guest
    Use the Form's "Print" method (and i dont mean "PrintForm"). "Print" doesnt show up in the intellisense drop down box (at least not for me), but look it up in the MSDN.

    Z.

  3. #3
    Frenzied Member Jotaf98's Avatar
    Join Date
    Jun 2000
    Location
    I'm not gonna give you my IP address! Ok... Portugal, South-Western Europe, 3rd rock from the sun (our star is easy to find, a 47 Ursae Majoris in the Milky Way :p )
    Posts
    1,457
    And if you use it on another picturebox (invisible), you can even use BitBlt and backbuffering!
    Code:
    Temp = Me.GetIQ()
    'Error 9: Overflow
    'DON'T PANIC! :eek:

    To learn how to use realistic effects in your games like fire, rain, snow and magic effects, read my article on particles systems here.


    Jotaf's Theories!
    "Cats land on their feet. Toast lands peanut butter side down. A cat with toast strapped to its back will hover above the ground in a state of quantum indecision."

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