Problem with Capturing Image in Panel

  • Thread starter Thread starter vijay_3491
  • Start date Start date
V

vijay_3491

Hi,

1. In my application I have used a Panel with an big image inside it.
Scrollbars occurs in panel due to the size of the image. I need to
capture the image fully without scrolling the panel, but I get only
the image within the visible area of the panel.

I tried using DrawToBitmap method of panel class, but only the half of
the image is shown. Could anyone please let me know is there any
other way for getting the image fully.

2. Also please let me know how could print this image using C#.

Thanks in Advance
 
Hi,

1. In my application I have used a Panel with an big image inside it.
Scrollbars occurs in panel due to the size of the image. I need to
capture the image fully without scrolling the panel, but I get only
the image within the visible area of the panel.

I tried using DrawToBitmap method of panel class, but only the half of
the image is shown. Could anyone please let me know is there any
other way for getting the image fully.

2. Also please let me know how could print this image using C#.

I don't think that .NET provides built-in support for this. However, you
can use p/invoke to send the WM_PRINT message to the control, which will
cause it to draw into an arbitrary HDC you provide.

As far as printing goes, have you looked at the System.Drawing.Printing
namespace? Once you've got a valid image instance, the classes in that
namespace can be used to actually print.

Pete
 
Back
Top