Quantcast
Viewing all articles
Browse latest Browse all 27016

Cannot make this work : StartInfo.CreateNoWindow = False. Help!

Hi,
Due to my limited experience with VB.net (VS10) I cannot understand why the window keep showing.
This Sub gets a .txt file from the drive and prints it to the default printer.
But I do not want Notepad window flash on the screen before printing.

I did search for answers. But accordind to MSN it should work.
Please can you explain in a easy way as I am a begginer.

Regards and thanks.

Francesco


HTML Code:

Private Sub Print_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PrintToolStripMenuItem.Click
        ' Prints a text file directly to default printer
        Try
            Dim print_this As New Process

            print_this.StartInfo.FileName = results_path ' Print current file (txt file)
            print_this.StartInfo.Verb = "Print"
            print_this.StartInfo.CreateNoWindow = False
            print_this.Start()
        Catch exp As Exception
            MessageBox.Show(exp.Message)
        End Try
    End Sub


Viewing all articles
Browse latest Browse all 27016

Trending Articles



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