Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27201

How to Print a Hidden Form vb.net

$
0
0
Hi,

I want to know how to print a hidden form. I have try whit FormPrint, but the form must be visible and Focus.

I also try this :

Code:

        Dim form As Form1
        form = New Form1(RMmain)
        form.Show()
        PrintForm.Form = form
        PrintForm.PrinterSettings.DefaultPageSettings.Margins = New Margins(5, 5, 5, 5)
        PrintForm.PrintAction = Printing.PrintAction.PrintToPrinter
        PrintForm.PrinterSettings = Printer

        PrintForm.Print()
        form.Close()

But the form dont have to time to display completely before the print()... i have try whit Delay but this not work...

Someone can help me ?

Thank

Viewing all articles
Browse latest Browse all 27201

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>