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

How to solve flicker effect

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 create your own graph by adding
curve points into a coordinate system grid. I create a Panel and draw everything on it.

Also you can pick the control points and drag them to another
spot. If I do so, I get such a bad flicker effect (only in the panel)
and sometimes the whole background is blank.

my paint method looks like this:

private void PaintTF(object sender, PaintEventArgs e)
{

Graphics g = e.Graphics;
Graphics.FromImage(myBitmap).Clear(System.Drawing. Color.LightGray);
Graphics bufferedGraphics = Graphics.FromImage(myBufferBitmap);
bufferedGraphics.DrawImage(myBitmap, 0, 0);

bufferedGraphics.DrawAllTheStuff....

g.DrawImage(myBufferBitmap, 0, 0);
bufferedGraphics.Dispose();

}

And in the MouseMove method i do Panel.Refresh(). I also tried overriding the this.OnPaintBackground and this.OnPaint but then my graph gets drawn behind the panel but it is supposed to be on the panel. If anybody can help me with that, I would be so happy.

cheers
Feb 21 '08 #1
1 1765
koi
5
Hai,

Rather than doing Panel.Refresh() do Panel.Invalidate().

Then make doublebuffer property of the application to true

hope it works..
Feb 26 '08 #2

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

Similar topics

4
by: Marek Mänd | last post by:
This seems an IE issue only: 4253 bytes testcase: http://www.hot.ee/idaliiga/testcases/ieselect/bnlinkingselectinmsie.htm Can one have 1) a mouseover/mouseout element on TBODY 2) change in...
4
by: Alok | last post by:
I have a very peculiar issue and would greatly appreciate any help. I am using Access 97 on Windows XP Home. I am using Compaq Presario 2500 laptop. When I open up any module in design mode, the...
4
by: steve | last post by:
ok, ok...obj.suspendlayout/resumelayout. but it isn't helping and i need advice. i have a custom progress bar made from a label control. i manually paint it when the progress changes. i'm drawing a...
20
by: Charles Law | last post by:
This is actually a follow on from yesterday's post about masking mouse clicks in a user control. The solution I have implemented - from Herfried - places a transparent window over the entire...
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...
1
by: pduncan | last post by:
I'm putting custom tooltips on my buttons and am getting a flicker effect with buttons in Internet explorer (not firefox) When you mouse over a button in internet explorer, the outline of the...
4
by: Frank Rizzo | last post by:
Hello, I inherited a large Winforms project that is suffering from excessive flicker when switching between portions of the application. I've noticed that most parts of the application (user...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.