hi all, i'm using VS2005
In my code I create a bitmap of 5000x5000 (+or-) and I need to display
it in a part of my
windows form. How can i do to ? which container shall i use, and how to
scroll it ?
I need to modify my bitmap at runtime, and i want to make this changes
visibile as soon
as i perform them.
I tried to use a panel box and then i did this:
this.myPanel.Im age = myBitmap;
then i link the panel with two scrollbars
private void myPanel_vScroll _Scroll(object sender, ScrollEventArgs e)
{
int newy = (e.NewValue * (bitmap_height -
myPanel.ClientS ize.Height)) / 100;
myPanel.Top = -newy;
}
(the same for hScroll bar)
Doing so, i obtain that the panel moves correctly according to the
scroll of the scrollbars, but the
image that is inside scrolls out (while i scroll the bar) and the new
parts of the panel that should be updated with new parts of the image
aren't updated. Why?
Should I use another method due to the high dimension of the bitmap ?
Thank you
In my code I create a bitmap of 5000x5000 (+or-) and I need to display
it in a part of my
windows form. How can i do to ? which container shall i use, and how to
scroll it ?
I need to modify my bitmap at runtime, and i want to make this changes
visibile as soon
as i perform them.
I tried to use a panel box and then i did this:
this.myPanel.Im age = myBitmap;
then i link the panel with two scrollbars
private void myPanel_vScroll _Scroll(object sender, ScrollEventArgs e)
{
int newy = (e.NewValue * (bitmap_height -
myPanel.ClientS ize.Height)) / 100;
myPanel.Top = -newy;
}
(the same for hScroll bar)
Doing so, i obtain that the panel moves correctly according to the
scroll of the scrollbars, but the
image that is inside scrolls out (while i scroll the bar) and the new
parts of the panel that should be updated with new parts of the image
aren't updated. Why?
Should I use another method due to the high dimension of the bitmap ?
Thank you