+1  A: 

I honestly have no idea whether that would work, but my guess is that if a scrollbar isn't present on the form it wouldn't.

However, I would expect that if you have a PictureBox control that was sized larger than the client area of the form, and you moved it, it would be updated with only the specific clip region.

overslacked
+1  A: 

You could try putting the drawing whatever it is in a separate container then just moving the location of the container to a location off the main form. .location = -10,0 for example. This will create the illusion that it moved a certain number of pixels off the screen. You can also always fire your own repaint event if the location change does not successfully do this. Other than that you can always owner draw everything.

Mark
+1  A: 

Since you're using System.Drawing you'll need to tell the drawing methods (OnPaint() or where ever you're drawing) to start drawing at an x offset of -10 pixels. Everything you draw would then be offset by that amount.

Shifting the whole drawing left 10 pixels would be cause to invalidate the whole screen region, not just the 10 pixels on the right of the screen. There are a couple of ways you could do this:

1) Set your offset to -= 10 pixels. Invalidate the whole screen by calling Invalidate(). This would force a redraw of the entire screen and, as long as you have coded your offsets correctly, will redraw everything 10 pixels over. 2) Take an in-memory dump of what's on the screen and make an Image out of it. Then redraw that image 10 pixels to the left off the screen. After that, simply Invalidate the right-most 10 pixels.

Method #2 is, in fact, a lot slower than method #1. Redrawing the screen is quite fast if you don't have millions of things you need to draw.

rein
+3  A: 

You can add a panel to the form that is larger then the form. Keep the scroll bar turned off and manually scroll the panel by setting the value properties of the VerticalScroll and HorizontalScroll properties of the Panel.

Then add your drawing to the panel instead of the form.

 this.panel1.VerticalScroll.Value = 50;
this.panel1.HorizontalScroll.Value = 100;
Chris Persichetti