Hi I'm trying to print a Form that I created using a VB.Net console application. My console application creates an instance of a Windows Form and fills it with data. I then created an instance of the Print Form class from the Microsoft Power Pack and am trying to get the form I filled with data to print but no matter what I've tried it just prints the command console window.
Dim firstPage As New FrontPage 'Windows Form
Dim pf As New PrintForm 'Print Form Power Pack
firstPage.Visible = True
firstPage.Focus()
pf.Form = firstPage
pf.PrintAction = Drawing.Printing.PrintAction.PrintToPrinter
pf.Print()
Dim firstPage As New FrontPage 'Windows Form
Dim pf As New PrintForm 'Print Form Power Pack
firstPage.Visible = True
firstPage.Focus()
pf.Form = firstPage
pf.PrintAction = Drawing.Printing.PrintAction.PrintToPrinter
pf.Print()