D
D
Dmitry Korolev2018-11-29 05:13:47
Windows Forms
Dmitry Korolev, 2018-11-29 05:13:47

How to take an image of what is under control?

I have a control on which there are other elements. The control does not fit into the parent control.
How can I get a screenshot of such content in an image file?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
WayMax, 2018-11-29
@adressmoeistranici

Bitmap bmp = new Bitmap(button1.Width, button1.Height);
button1.DrawToBitmap(bmp, button1.ClientRectangle);

instead of "button1" - the name of your control

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question