Thread: help me with this

  1. #1
    Registered User
    Join Date
    Oct 2003
    Posts
    38

    help me with this

    Dear All,
    I have designed one Form, there is some draw inside, include an background rectangle and grids, and a data line.
    I want to keep the rectangle and grids unchange, but the data refresh every 2 seconds(because the data vary every 2 seconds).
    How can do that? it seems Invalidate() cannot do that.
    Thanks

  2. #2
    I am unsure exactly what you mean ( perhaps the board verterans can decipher it ?? ) ...

    Do you mean to say that you want to repaint a window?

  3. #3
    Registered User
    Join Date
    Oct 2003
    Posts
    38
    My meaning is every 2 seconds, the data line will be updated( the data line is something like wave), the data line overlap with the rectangle which have horiz.and vertical grids, in my program, when the data line is updated, entire client area included the data line and the rectangle, grids are flashing, but my goal is keeping the rectangle and grids not flash, just stay as the background, but flashing the data line every 2 seconds only.
    Can this be clear???
    Thank you.

  4. #4
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,130
    You have to repaint everything. What you probably mean is that your picture is flickering because you simply paint on the form. Look up the technique of "double buffering" which basically means you paint it in the background and display it once it's completely drawn.
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

Popular pages Recent additions subscribe to a feed