Problem with Capturing Image in Panel

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
 
P

Peter Duniho

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top