M
mrabie
hi all,
i am writing my own messagebox control, it's composed of 3 parts
1) Top bar
2) Middle Area (resizable)
3) Buttom bar
the top and bottom bar sizes doesn't change, but the middle area
changes depending on the size of the dialogbox (im my case a form that
i resize). When i draw the middle image it moves 1 pixel to the right
and goes 1 pixel out of the display bounds... i don't know why, here's
what i am doing
protected override void OnPaint(PaintEventArgs e)
{
gxBuffer.DrawImage(topBar, 0, 0);
gxBuffer.DrawImage(middleArea,new Rectangle(0,this.Location
+topBar.Height,this.Width,this.Height),new
Rectangle(0,0,this.middleArea.Width,this.middleArea.Height),
GraphicsUnit.Pixel);
gxBuffer.DrawImage(buttomBar, 0, this.Location.Y -
buttomBar.Height);
e.Graphics.DrawImage(offScreen, 0, 0);
}
although when i place the middleArea image in a picturebox and stretch
it, it works well....
any pointers would be really apreciated
Thanks
i am writing my own messagebox control, it's composed of 3 parts
1) Top bar
2) Middle Area (resizable)
3) Buttom bar
the top and bottom bar sizes doesn't change, but the middle area
changes depending on the size of the dialogbox (im my case a form that
i resize). When i draw the middle image it moves 1 pixel to the right
and goes 1 pixel out of the display bounds... i don't know why, here's
what i am doing
protected override void OnPaint(PaintEventArgs e)
{
gxBuffer.DrawImage(topBar, 0, 0);
gxBuffer.DrawImage(middleArea,new Rectangle(0,this.Location
+topBar.Height,this.Width,this.Height),new
Rectangle(0,0,this.middleArea.Width,this.middleArea.Height),
GraphicsUnit.Pixel);
gxBuffer.DrawImage(buttomBar, 0, this.Location.Y -
buttomBar.Height);
e.Graphics.DrawImage(offScreen, 0, 0);
}
although when i place the middleArea image in a picturebox and stretch
it, it works well....
any pointers would be really apreciated
Thanks