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. User Controls

User Controls

Scheduled Pinned Locked Moved C#
winformstutorial
3 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.
  • I Offline
    I Offline
    IceFear
    wrote on last edited by
    #1

    I need a solution for reducing or removing the flicker in the user controls (some controls I made) ... I'm seeking an effectient way; so please if anyone know how to do it, please tell me ... NOTE : I have already used the DoubleBuffer Style and still got some sort of flicker ... The controls are drawn from A to Z so it continue flickering and flickering :~ :~ :~ ... Thanks for your time ....

    J 1 Reply Last reply
    0
    • I IceFear

      I need a solution for reducing or removing the flicker in the user controls (some controls I made) ... I'm seeking an effectient way; so please if anyone know how to do it, please tell me ... NOTE : I have already used the DoubleBuffer Style and still got some sort of flicker ... The controls are drawn from A to Z so it continue flickering and flickering :~ :~ :~ ... Thanks for your time ....

      J Offline
      J Offline
      Jay Shankar
      wrote on last edited by
      #2

      For the control's painting have you used Graphics from PaintEventArgs?. like for form Paining.....same as below code.

      private void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
      {
      Graphics g = e.Graphics;

      g.DrawString("Happy X-Mas", this.Font, Brushes.Blue, 0,0);
      

      }

      Note: If you DONOT use Graphics from PaintEventArgs, there will always reamin flickering, I had the similar problem once, I solved it using the above approach.

      I 1 Reply Last reply
      0
      • J Jay Shankar

        For the control's painting have you used Graphics from PaintEventArgs?. like for form Paining.....same as below code.

        private void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
        {
        Graphics g = e.Graphics;

        g.DrawString("Happy X-Mas", this.Font, Brushes.Blue, 0,0);
        

        }

        Note: If you DONOT use Graphics from PaintEventArgs, there will always reamin flickering, I had the similar problem once, I solved it using the above approach.

        I Offline
        I Offline
        IceFear
        wrote on last edited by
        #3

        I'm using the graphics supplied as a parameter in the OnPaint ; What really makes the control filkering more and more, is its nature as a container (such as the panel), When the control is drawn without any children controls, it works very good but when adding the children controls, it starts flickering in an unacceptable fashion ... Thanks for helping but I stell need some more IDEAS ...

        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