Re: PPC flicker problem.
- From: "pengjetty" <pengjetty@xxxxxxxxx>
- Date: 31 May 2006 01:55:02 -0700
I solve it out.
and then I delete the OnPaintBackground(PaintEventArgs paintg).
It doesn't affect the appearence.
So, this method is just useful in some condition.
pengjetty wrote:
protected override void OnPaintBackground(PaintEventArgs paintg)
{
// Left empty, avoids undesirable flickering
}
Like this?
I have done that, but it doesn't make any difference.
<ctacke/> wrote:
Override the OnPaintBackground and have it do nothing.
-Chris
<pengjetty@xxxxxxxxx> wrote in message
news:1148977284.219611.18040@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
There is a picture(512*512) in the panel(300*200), when I move the
mouse, the picture in the panel should also move following the mouse...
But here comes the problem, when I deploy this program on the HP2790
and drag the picture, the screen is flicker.
I use the Bitblt, but it doesn't work.
Does anyone can solve it? Any advice is helpful.Thank you.
Here is my code(the event handle of mousemove and the paint handle of
the panel):
private void panelMap_MouseMove(object sender,
System.Windows.Forms.MouseEventArgs e)
{
if (mouseIsDown == true)
{
this.presentPoint.X = this.lastPoint.X + (e.X -
this.downPoint.X) * 2;
this.presentPoint.Y = this.lastPoint.Y + (e.Y -
this.downPoint.Y) * 2;
this.panelMap.Refresh();
}
}
// Bitblt in C#
private void panelMap_Paint(object sender,
System.Windows.Forms.PaintEventArgs e)
{
Graphics g;
if (this.bufferMap == null)
{
this.bufferMap = new Bitmap(this.panelMap.Width,
this.panelMap.Height);
}
g = Graphics.FromImage(this.bufferMap);
g.DrawImage(this.imgMap, this.presentPoint.X, this.presentPoint.Y);
e.Graphics.DrawImage(this.bufferMap, 0, 0);
}
.
- References:
- PPC flicker problem.
- From: pengjetty
- Re: PPC flicker problem.
- From: <ctacke/>
- Re: PPC flicker problem.
- From: pengjetty
- PPC flicker problem.
- Prev by Date: Re: PPC flicker problem.
- Next by Date: Device ASSPs
- Previous by thread: Re: PPC flicker problem.
- Next by thread: Re: PPC flicker problem.
- Index(es):
Relevant Pages
|