生成面板的位图图像? [英] Generating Bitmap image of a panel?
本文介绍了生成面板的位图图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
要生成面板的位图图像吗?
我想生成面板的位图图像.
面板尺寸与A4尺寸的纸张相同.
如何在使用C#的桌面应用程序中执行此操作.
Generating Bitmap image of a panel?
I want to generate a bitmap image of a panel.
Panels size is same as that of A4 size paper.
How can i do this in desktop application using C#.
推荐答案
您可以使用 ^ ]方法.例如:
You can use Control.DrawToBitmap[^] method. For example:
// Create bitmap with appropriate size
Bitmap bmpPanel = new Bitmap(myPanel.Width, myPanel.Height);
// Draw the panel to this bitmap
myPanel.DrawToBitmap(bmpPanel, new Rectangle(0, 0, myPanel.Width, myPanel.Height));
// Now you can do whatever you want with the bmpPanel...
:)
这篇关于生成面板的位图图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文