Results 1 to 4 of 4

Thread: Flickering with FillRect

  1. #1

    Thread Starter
    Fanatic Member Mxjerrett's Avatar
    Join Date
    Apr 2006
    Location
    Oklahoma
    Posts
    939

    Flickering with FillRect

    I am making a usercontrol and for some reason when I change the value it flickers if I move it fast. I've tried to optimize it, but for some reason it still flickers.

    Also for some reason sometimes it crashes.
    Attached Files Attached Files

    If a post has been helpful please rate it.
    If your question has been answered, pull down the tread tools and mark it as resolved.

  2. #2
    VB For Fun Edgemeal's Avatar
    Join Date
    Sep 2006
    Location
    WindowFromPoint
    Posts
    4,255

    Re: Flickering with FillRect

    Try setting the user control AutoRedraw to True?

  3. #3

    Thread Starter
    Fanatic Member Mxjerrett's Avatar
    Join Date
    Apr 2006
    Location
    Oklahoma
    Posts
    939

    Re: Flickering with FillRect

    Hmm that does appear to take a fair bit of the flickering away and it doesn't seem to crash like it did last time.

    If a post has been helpful please rate it.
    If your question has been answered, pull down the tread tools and mark it as resolved.

  4. #4
    VB For Fun Edgemeal's Avatar
    Join Date
    Sep 2006
    Location
    WindowFromPoint
    Posts
    4,255

    Re: Flickering with FillRect

    Quote Originally Posted by Mxjerrett
    Hmm that does appear to take a fair bit of the flickering away and it doesn't seem to crash like it did last time.
    You may be crashing because you are creating brushes but not destroying them (I haven't really looked at your code) , you might want to look up that stuff on MSDN or at examples using those calls. There is some examples in this tutorial by Mike D. Sutton, Using Device Contexts (DCs) in Visual Basic

    i.e. GetSysColorBrush() is not as flexible but doesn't need to be destroyed since the the brush is owned by Windows.
    Last edited by Edgemeal; Jul 3rd, 2008 at 02:00 PM.

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