Is there a way to show part of one form in another form?

I have a form. All I want to do is show a section of this form in a different form. I don't want this to be functional or anything. I just want it to be a painting. Is this possible, and if so, how?

how

display = new display(form, new rectangle(X1, X2, Y1, Y2));

      

Is it possible?

+3


source to share


1 answer


Yes, you can do:

Bitmap bmp = new Bitmap(myWidth, myHeight);
myForm.DrawToBitmap(bmp, new Rectangle(x, y, bmp.Width, bmp.Height));

      



And then pass that bitmap to another shape.

+6


source







All Articles