how can I get a picture of the panel that in my application and save it
Egypt Pharaoh
0
Light Poster
Recommended Answers
Jump to Postprivate static Bitmap GetScreenShot(Control ctrl) { Bitmap result = new Bitmap(ctrl.Width, ctrl.Height, PixelFormat.Format32bppArgb); using (Graphics gfx = Graphics.FromImage(result)) { Point pt = ctrl.PointToScreen(new Point(0, 0)); gfx.CopyFromScreen(pt.X, pt.Y, 0, 0, result.Size, CopyPixelOperation.SourceCopy); } return result; } private void button7_Click(object sender, EventArgs e) { Bitmap panelScreenshot = GetScreenShot(panel1); pictureBox1.Image …
Jump to PostThis sounds like a very bad idea. Are you sure this is the approach you want to take? With printing you need to take a lot of things in to account and if you print controls like that it will basically be a screenshot of the form. You can't cleanly …
All 6 Replies
sknake
1,622
Senior Poster
Featured Poster
Geekitygeek
commented:
nice...never knew you could do that :D
+1
Egypt Pharaoh
0
Light Poster
sknake
1,622
Senior Poster
Featured Poster
ddanbe
2,724
Professional Procrastinator
Featured Poster
Egypt Pharaoh
0
Light Poster
sknake
1,622
Senior Poster
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.