17296

在C#中打印的WinForm(Print winform in C#)

如何打印在C#2008年整体的winform?

我的表单包含图片框,3个文本框。

Answer 1:

使用在Visual Basic PowerPack中的PrintForm控制。 它是自2008年VS工具箱甚至在C#项目。 我认为它可能已在SP1中添加。 更多信息这里 。



Answer 2:

认为这可能是没有第三方库的事,我已经使用PrintForm.Net与成功的过去。



Answer 3:

使用下面的代码。

using Microsoft.VisualBasic.PowerPacks.Printing; private void printButton_Click(object sender, EventArgs e) { printForm1.Print(this, PrintForm.PrintOption.ClientAreaOnly); }

对于的printoptions请参阅此链接MSDN



文章来源: Print winform in C#

Recommend

  • 什么是发现遍历图的所有顶点的路线更好的算法?(What is a better algorithm
  • Creating new ASP.Net MVC project - Unit Test Dialog does not show up
  • Silverlight Tools for Visual Studio 2008 - Placing a Control Issue
  • Monitoring Servicemix with Hyperic HQ
  • Shortest path in a grid
  • How to deal with the messages block in Magento hole punching
  • AVAudioPlayer - Why is there a gap between loops (uncompressed audio)
  • What is the best SIMPLE replacement for VS Setup-project Installer for WinXP + WPF + .NET 4.0? [clos
  • NSCollectionView does not scroll items past initial visible rect
  • SQL to return field with non-numeric characters removed in MySQL
  • Should concrete implementation provide any public API not present in the interface it implements?
  • Parallel Computing - Shuffle
  • What's the usecase for ons.ready()?
  • Toggle visibility of text box based on status of check box -jQuery
  • Unmanaged code calling vb.net callback
  • Illegal state exception while calling signout through GoogleApiClient
  • Will cin recognize \\n typed in from keyboard as a newline character?
  • Find code that depends on .NET 3.5 SP1
  • Ansible: setting user on dynamic ec2
  • Python 3 Sorting a List of Tuples?
  • Sticky Footer W/JQuery Mobile
  • Get sibling of Vaadin Tree Item?
  • Visual Basic 6 on Win7 64bit: Will developed program run on 32-bit Win OS?
  • No rows to manipulate in html table created with jQuery csvToTable?
  • Injecting service into a mixin Ember2.3+
  • TextBox AutoCompleteStringCollection Suggest
  • React Router and Arbitrary Query Params: Page Refreshes Unintentionally on Load?
  • remove unicode characters but keep all special and English characters with preg_replace
  • Why isn't my “Fizz Buzz” test in R working?
  • Python PIL to extract number from image
  • powershell Get-Counter -ComputerName parameter on Windows 7
  • Xamarin MonoAndroid Azure mobile service InsertAsync
  • CodeIgniter URI Parameter is partially bypassing an “if” statement
  • opencv display image without x server
  • Private IP address in reserved subnet range
  • How To Customize ASP.NET Chart Databound To SqlDataSource
  • Get object from AWS S3 as a stream
  • Cross-Platform Protobuf Serialization
  • Validaiting emails with Net.Mail MailAddress
  • Do I've to free mysql result after storing it?