My first post here so here goes,
i have a UserControl with about 30 controls (labels, textboxes etc). Now i would like to make a "screenshot" of it. So i used the "DrawToBitmap" method from the UserControl.
Here some samplecode
//this is the UserControl with the about 30 controls
var sampleusercontrol = new SampleUserControl();
var bmp = new Bitmap(sampleusercontrol.Width, sampleusercontrol.Height);
sampleusercontrol.DrawToBitmap(bmp, sampleusercontrol.Bounds);
if i run this code, it returns me a black image all the time. I have no clue why. Please help!
Edit:
Forgot to say that the UserControl is a WinForms UserControl