Dotnet-StuffWorld

Thursday, July 23, 2009

 

"PrintForm" Component, available in .NET 3.5 SP1

An alternative use the 'PrintForm' component, which is available now in .NET 3.5 SP1 or available as a separate download . Here is Some sample code:

Place a ToolstripButton on to the Form :

private void toolStripButton2_Click(object sender, EventArgs e)
{
if (this.ActiveMdiChild == null)
return;
printForm1.Form = this.ActiveMdiChild;
printForm1.PrintAction = System.Drawing.Printing.PrintAction.PrintToPreview;
printForm1.Print();
}

Labels:


Archives

April 2009   July 2009   August 2009   September 2009   September 2010   February 2011  

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]