Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. new Double Buffering

new Double Buffering

Scheduled Pinned Locked Moved C#
graphicsperformancetutorial
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    HexaDeveloper
    wrote on last edited by
    #1

    hi all i made double buffering in a form with this.DoubleBuffering = true; but this is not working in the tab so i wanna to know how to make double buffering by using Bitmap to enhance performance by drawing in memory as bitmap and then draw my background in the bitmap and draw bitmap again to the screen can any one tell me how to begin search how to use this technique thanx Generator

    C 1 Reply Last reply
    0
    • H HexaDeveloper

      hi all i made double buffering in a form with this.DoubleBuffering = true; but this is not working in the tab so i wanna to know how to make double buffering by using Bitmap to enhance performance by drawing in memory as bitmap and then draw my background in the bitmap and draw bitmap again to the screen can any one tell me how to begin search how to use this technique thanx Generator

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      I think SetStyles is the method you call, turn on double buffering and all drawing in WMPAINT.

      Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

      H 1 Reply Last reply
      0
      • C Christian Graus

        I think SetStyles is the method you call, turn on double buffering and all drawing in WMPAINT.

        Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

        H Offline
        H Offline
        HexaDeveloper
        wrote on last edited by
        #3

        hi, i tried this but the tabPage doesnot contain method setStyle iam making a method now to use BufferedGraphics, BufferedContext,BufferedManager to draw to buffer then draw to TabPage but iam still trying this and also if there is any method easier thanx Generator

        H 1 Reply Last reply
        0
        • H HexaDeveloper

          hi, i tried this but the tabPage doesnot contain method setStyle iam making a method now to use BufferedGraphics, BufferedContext,BufferedManager to draw to buffer then draw to TabPage but iam still trying this and also if there is any method easier thanx Generator

          H Offline
          H Offline
          HexaDeveloper
          wrote on last edited by
          #4

          public void tab_Paint(object sender, PaintEventArgs e) { TabPage tab = (TabPage)sender; BufferedGraphicsContext context; BufferedGraphics buffer; // context = BufferedGraphicsManager.Current; /// Dedicated context /// used when highly animated graphics context = new BufferedGraphicsContext(); Graphics grfx = tab.CreateGraphics(); buffer = context.Allocate(grfx, tab.ClientRectangle); drawSurfaceToBuffer(buffer.Graphics); buffer.Render(grfx); buffer.Dispose(); grfx.Dispose(); } public void drawSurfaceToBuffer(Graphics bufferGrfx) { /// some processing that used the buffer grfxs } this code i understand it from MSDN and write it to reduce Graphics Flicker but it does not make any thing at all also it make my background of tabpage black and the original is white is there any suggestions please Generator

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups