简体   繁体   English

在C#中打印隐藏的表单?

[英]Printing a hidden Form in C#?

i have a windows form that contains a bunch of textboxes. 我有一个包含一堆文本框的Windows窗体。 I need a way to print them out on a peice of paper. 我需要一种将它们打印在一张纸上的方法。 What i did is transfer the information from the first form to the second form. 我所做的是将信息从第一种形式转移到第二种形式。 I formated the second form the way i wanted it to look like when i printed it. 我将第二种格式格式化为希望打印时的样子。 I am using the PrintForm Control. 我正在使用PrintForm控件。 Using this controls makes me have to make it visible to print it. 使用此控件使我必须使其可见才能打印。

Is there any other way i can print my second form right when it loads and hide it so that the user does not see that form? 还有什么其他方法可以在我加载第二个表单并将其隐藏时正确打印出第二个表单,以使用户看不到该表单?

Make the form visible, but just out of view. 使表单可见,但不可见。 Eg Location = new Point(-1000, -1000); 例如Location = new Point(-1000, -1000);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM