CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2010
    Posts
    2

    Many controls; flicker free with CreateParams

    Hello everyone,
    I have a form with 10 tab pages. Each page has about 30 controls on it, mostly text boxes.
    When switching between tabs, you can see a split second of the controls being drawn. Although it is not a big deal, it looks very unprofessional.

    I've tried double buffering each control, as well as the form itself, but nothing helped.
    I then came across this:

    protected override CreateParams CreateParams
    {
    get
    {
    CreateParams cp = base.CreateParams;
    cp.ExStyle |= 0x02000000;
    return cp;
    }
    }

    This eliminates flicker COMPLETELY. It forces double buffering at form level on all controls.

    Everything looks nice and fluid, however, my mappoint control does not like this command.

    With this code in place, the map is extremely slow and it hangs when I try to make a route.

    Does anyone know of an alternative method for a flicker free program?

  2. #2
    Join Date
    Jun 2008
    Posts
    2,477

    Re: Many controls; flicker free with CreateParams

    What is a "MapPoint" control anyway?

  3. #3
    Join Date
    Aug 2010
    Posts
    2

    Re: Many controls; flicker free with CreateParams

    http://www.microsoft.com/mappoint/en-us/default.aspx

    MapPoint is a mapping and gps application. It has it's own ocx control that you can implement maps in your own .net programs.

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

Featured