如何将Gui转换为Jpeg图像 [英] How Can I Convert The Gui In To A Jpeg Image

查看:61
本文介绍了如何将Gui转换为Jpeg图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从未进行过这种转换。



我是一个初学者。

请帮我提高技能。

i Never had this type of conversion.

iam a beginer.
please help me improve my skill.

推荐答案

以下示例源代码显示如何捕获表单并将其保存到位图。希望你觉得它很有用。



The following example source code shows how to capture the form and save it to a bitmap. Hope you find it useful.

Point point = new Point();
Rectangle rectangle = new Rectangle(point, this.Size);
Bitmap bitmap = 
    new Bitmap(rectangle.Width, rectangle.Height, PixelFormat.Format32bppRgb);
// render the form to the bitmap 
this.DrawToBitmap(bitmap, rectangle);
bitmap.Save(@"d:\MyForm.bmp");


这篇关于如何将Gui转换为Jpeg图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆