473,385 Members | 1,356 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,385 software developers and data experts.

How to paint 4 panels on a form separately at the same time without flicker

hi,
i've got a big problem with painting 4 or more than 4 control such as
panel on a form.
i have 4 panel that their width and height is 3000px on form and also a
hscrollbal control that when i move the scroll bar the 4 panels move
with it.
but my problem is when i want to paint a grid on the form or anything
with paint event i come across flicker.
i think there is something wrong with DrawGrid function that i've
written.

can anyone tell me what to do ?

in link below, i've prepared a sample code in c# that explains
everything.

http://www.vdadashzadeh.com/temp/panels.zip

Jul 12 '06 #1
1 1445
Shot in the dark, but have you tried adding this to the top of the Paint
method:

this.DoubleBuffered = true;

Might help.

Steve
"Vahid Dadashzadeh" <va*********@gmail.comwrote in message
news:11**********************@p79g2000cwp.googlegr oups.com...
hi,
i've got a big problem with painting 4 or more than 4 control such as
panel on a form.
i have 4 panel that their width and height is 3000px on form and also a
hscrollbal control that when i move the scroll bar the 4 panels move
with it.
but my problem is when i want to paint a grid on the form or anything
with paint event i come across flicker.
i think there is something wrong with DrawGrid function that i've
written.

can anyone tell me what to do ?

in link below, i've prepared a sample code in c# that explains
everything.

http://www.vdadashzadeh.com/temp/panels.zip

Jul 12 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: AndrewDucker | last post by:
I've just started working with some people that have an odd setup and I'm wondering if someone can point out a better way of doing things (or what I'm doing wrong). They have a base form class,...
3
by: pacemkr | last post by:
Is it possible to force a control to paint to a Graphics object (or Device Context, or a bitmap, anywhere aside from the form) that I provide. I am writing a windows form class that supports...
5
by: Peter Oliphant | last post by:
I'm drawing graphics using the Graphics object one can grab in a Form's Paint event. But I'm getting a weird thing happening... These graphic shapes flicker (even if unchanged). UNLESS- I created...
7
by: hamil | last post by:
The following code will display a tif file on a form. When another form is moved over the tif image, the tif image is erased where the form was moved. A paint event occurs when this happens. My...
6
by: chris.dannemiller | last post by:
I need to be able to move a few form abouts around after a event occurs but when I do this it causes massive flickering is there any way to reduce this?
1
by: Ben | last post by:
Hi We have a number of Panels on our windows form, we have controls inside and outside of the panels. I am having problems tabbing between controls, it appers to be when the controls are...
0
by: Andy Wynn | last post by:
I have a custom control that has a rectangle drawn at the bottom of the control. Nothing fancy, just a rectangle with a color fill. The control has the ability to be resized ( Collapsed -...
1
by: Mecena | last post by:
Hi all! I have a problem regarding form loading speed. I have forms with many controls and some time ago I've implemented a fader that uses a symbollic millisecond of fade time to buffer the...
9
by: raylopez99 | last post by:
Just an observation: pens for drawing lines in Win Forms are tricky when assignment is inside the paint handler. inside of the Paint handler, but not inside a "using" brace (that is, outside of...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: 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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.