|
-
Jan 11th, 2012, 10:00 PM
#1
Thread Starter
Addicted Member
Why does my double buffered form still flicker?
I was wondering if it someone could help me solve this problem. I have a full screen application with a panel in the center which is used to display different user controls and screens when the user uses the app. However, I have a rather large gradient image set as my form's background and it causes the panel to flicker every time controls are added. I find that when the background image is removed the flicker goes away. How can I keep the background image but eliminate the flicker? My form is already double buffered. Any help would be appreciated. Thanks.
Always looking to meet fellow programmers. Message me if you want. Happy to help in whatever ways I can 
-
Jan 11th, 2012, 10:58 PM
#2
Re: Why does my double buffered form still flicker?
By default, the BackgroundImageLayout property of the form is set to Tile. Try changing it to Stretch.
CodeBank contributions: Process Manager, Temp File Cleaner
 Originally Posted by SJWhiteley
"game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....
-
Jan 11th, 2012, 11:54 PM
#3
Re: Why does my double buffered form still flicker?
Create a buttered panel... Search for buffered panel
Kris
-
Jan 12th, 2012, 05:44 AM
#4
Thread Starter
Addicted Member
Re: Why does my double buffered form still flicker?
 Originally Posted by weirddemon
By default, the BackgroundImageLayout property of the form is set to Tile. Try changing it to Stretch.
The background image is already set to stretch. Is there any way to disable the image from repainting each time a control is added to the panel?
Always looking to meet fellow programmers. Message me if you want. Happy to help in whatever ways I can 
-
Jan 12th, 2012, 05:51 AM
#5
Thread Starter
Addicted Member
Re: Why does my double buffered form still flicker?
 Originally Posted by weirddemon
By default, the BackgroundImageLayout property of the form is set to Tile. Try changing it to Stretch.
The background image is already set to stretch. Is there any way to disable the image from repainting each time a control is added to the panel?
Always looking to meet fellow programmers. Message me if you want. Happy to help in whatever ways I can 
-
Jan 12th, 2012, 06:03 AM
#6
Re: Why does my double buffered form still flicker?
Setting the form's DoubleBuffered property doesn't make the panel double buffered. Changing the children of the panel at runtime could be causing the flickering. The Panel class has a DoubleBuffered property but it is Protected. One way to set it is to make a class which inherits from Panel:
vb Code:
Public Class DBPanel Inherits Windows.Forms.Panel Public Sub New() Me.DoubleBuffered = True End Sub End Class
Then you use the DBPanel instead of a normal Panel.
BB
Last edited by boops boops; Jan 12th, 2012 at 06:06 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|