如何以Win形式打印面板元素....帮助我...... [英] How Can I Print Panel Element In Win Form .... Help Me.....

查看:67
本文介绍了如何以Win形式打印面板元素....帮助我......的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个胜利形式的面板,具有相同的有效背景,

,我不会打印这个面板包含元素(背景,标签等).....



我怎么能这样做....帮助我

i have a panel in win form with same effective background,
and i wont to print this panel with contain element (background, label etc ) .....

how can i do this .... help me

推荐答案

嗯......你可以做到,但它是一个非常糟糕的主意。

首先将面板绘制到位图上:

Well...you can do it, but it's a pretty poor idea.
Start by drawing the panel onto a bitmap:
Bitmap bmp = new Bitmap(myPanel.Width, myPanel.Height);
myPanel.DrawToBitmap(bmp, new Rectangle(0, 0, myPanel.Width, myPanel.Height));



然后您可以像往常一样使用PrintDocument来打印位图。



但它是一个更好的想法是将你真正想要的东西直接打印到PrintDocument上:结果会好很多......


You can then use a PrintDocument as usual to print the bitmap.

But it's a much better idea to print what you actually want directly onto the PrintDocument: the results will be a lot better...


这篇关于如何以Win形式打印面板元素....帮助我......的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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