winforms - Is there a way to make a screenshot of a component in C# -



winforms - Is there a way to make a screenshot of a component in C# -

is there way create screenshot of component in c#

i have panel graphics in there , want create screenshot of panel , display screenshot in picturebox.

so lot in advance support.

if using windows form seek using control.drawtobitmap method , create sure form has focus when run code.

graphics gfx = form.creategraphics(); bitmap bmp = new bitmap(form.width, form.height); form.drawtobitmap(bmp, new rectangle(0, 0, form.width, form.height)); bmp.save(filename);

you can utilize panel picturebox or other command inherited control instead of form

c# winforms panel picturebox

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -