• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 694
  • Last Modified:

Printing Active Child Form (vb.net 2008)

Good Morning,

I have an MDI form that display a child form.  What I want to do is print the child form without the the boarder of the mdi form and in the cneter of the page?  I've tried so many different ways and none have worked for me.  Any ideas at all?

The lastest code I tried was this:

With Me.PrintForm1
           .PrinterSettings.DefaultPageSettings.Landscape = True
           .Form = Me.ActiveMdiChild
           .PrintAction = System.Drawing.Printing.PrintAction.PrintToPreview

                PrintForm1.PrintAction = Printing.PrintAction.PrintToPrinter
             Catch ex As Exception
                MsgBox("A window must be displayed to print")
           End Try
End With

This code will show both the mdi form and the active child.  In some cases the child form is cut off.  I can't seem to center it on the page.

Thanks in advance all!!

1 Solution

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now