Scrolling a picture box.
- From: "David D Webb" <spivey@xxxxxxxxxxxxxxx>
- Date: Wed, 25 Jan 2006 16:53:57 -0500
I am trying to scroll a picture larger than the screen.
I have a form with a panel on it (240H). On this panel, I have a picture
box that is larger than the panel (960H). I have a vertical scroll bar on
the form next to the panel. Changing the scrollbar moves the picture box up
and the panel defines the viewing area:
this.pboxWeekCal.Top = -(this.vScrollBar.Value * 40);
Now, I didn't think the picture box would handle the clipping and redrawing
correctly. But I thought it would only have a blank area where the new
region came into view from the scrolling. What is happening though, is the
entire picturebox goes blank by just moving the scrollbar one change value.
Is the default paint event wiping it clear or something like that? Is there
a better way to do this. I have an offscreen bitmap that I can buffer from,
and worse case scenario, I'll redraw the entire viewable region for every
scroll change - in that case I'll just get rid of the picturebox and copy
onto the first panel directly.
Thanks,
Dave
Using Visual Studio 2003 and .NET CF sp2.
.
- Follow-Ups:
- Re: Scrolling a picture box.
- From: Alex Yakhnin [MVP]
- Re: Scrolling a picture box.
- Prev by Date: Re: Application closes while using Calculator
- Next by Date: Re: Can I develop for CE.NET 4.2 using VS 2005??? -totally confused
- Previous by thread: Re: Application closes while using Calculator
- Next by thread: Re: Scrolling a picture box.
- Index(es):
Relevant Pages
|