473,387 Members | 1,530 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

how to avoid flicker in panel

when i open my form, my form flikers , which look odd.
how can i overcome this problem?
Jun 12 '10 #1
7 5648
ThatThatGuy
449 Expert 256MB
@vikram rawat
Its probably that you might be painting something in your form...

You need to enabled the DoubleBuffered property of the control to reduce flickering...

And in Panel you won't find such a property so.. you need to create a custom Panel...

Create a custom Panel Contol (Custom Control)
and put this code in the panel constructor
Expand|Select|Wrap|Line Numbers
  1.             this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
  2.                 this.UpdateStyles();
  3.  
Jun 14 '10 #2
tlhintoq
3,525 Expert 2GB
when i open my form, my form flikers , which look odd.
how can i overcome this problem?
You're asking everyone to make a lot of assumptions and guesswork about your code. Please provide the code you are using for the constructor and the on_load event handler, so we can actually see what you are doing when the form is created and shown.
Jun 14 '10 #3
@ThatThatGuy
I already done this, but it does not reslove my problem.can you give me a another suggestion for this?
Jun 15 '10 #4
ThatThatGuy
449 Expert 256MB
@vikram rawat
check your code in OnPaint() method ...

You might be calling Invalidate() method inside OnPaint()..

can you post your code
Jun 15 '10 #5
GaryTexmo
1,501 Expert 1GB
The other option might be that you're just trying to draw too much in your paint method. GDI+ isn't known for its speed so if this is the case you might need to explore other drawing options.

That said, I'm with T and ThatThatGuy here. You need to either post some code or be more descriptive of what you're trying to do and what's going on.
Jun 15 '10 #6
ThatThatGuy
449 Expert 256MB
@vikram rawat
When using GDI+ Painting you need to be smart enough in handling all painting and drawing activities..

BCoz if you don't then GDI can really be a headbump
Jun 16 '10 #7
tlhintoq
3,525 Expert 2GB
OP doesn't want to provide code so we can actually help.
Since I am not psychic, I'm unsubscribing from this thread.
Jun 16 '10 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: mhansemann | last post by:
I'm a C# (but not programming in general) novice, but I couldn't find any answer to this elsewhere. I'm trying to make a text scroll on the form. I thought this was a good example to get started...
1
by: Alessandro Fragnani | last post by:
Hi, I would like to know how to avoid flicker while adding controls to a panel. I couldn´t find any kind of "BeginUpdate/EndUpdate" on it. Thanks in advance Alessandro
4
by: Marco Segurini | last post by:
Hi, I am trying to avoid flicker in this situation: 1) I create a simple VB6 Window application (a void form) and I define this code for the form (that has the autoredraw property set to...
3
by: Per Dunberg | last post by:
Hi all, I have to develop a "skinned" application and I have a problem with the graphics. When a form is loaded and displayed there's aways a flicker where all the controls are located on the...
4
by: Sarika | last post by:
I migrated a VB6.0 application to VB.NET. This app has a drawing area, which is a panel. The user can drag and drop several objects on this drawing area and can also draw lines, boxes etc. The app...
2
by: Peteroid | last post by:
When the application I'm working on is run it creates a panel with a Paint event customized to draw primitives (circles, rectangles, etc.), places the panel on a form, and then launches the form....
6
by: Paul_Madden | last post by:
I have a System.Windows.Forms.Form onto which I add a Panel (MyPanel) directly derived from System.Windows.Forms.Panel. Here are the important code fragments ... public class MyPanel : Panel...
17
by: pigeonrandle | last post by:
Hi, I have seen loads of different ways to do this, but the all seem to yield the same result - text that doesn't flicker when it's moving too slowly! Does anyone know 'the best way' to make text...
0
by: pianobasher | last post by:
Hello I have a class that's derived from a normal windows Form. I call it BaseContainer. It has a Panel and a built-in method to add another BaseContainer derivative inside that panel. I hoped...
1
by: sternchen | last post by:
Hi, I read all threads to this topic which were exactly like my problem and I tried all solutions but it still doesnt want to work :(. Can anybody help? I wrote an application where you can...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.