Results 1 to 2 of 2

Thread: Print button

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2010
    Location
    Ireland
    Posts
    85

    Print button

    My program is almost working, only thing I'm missing is a print button and I've been reading about the classes etc that need to be written, but I can't get a handle on it...

    Can anyone show me an example of a print class or printing?

    All I need to do is print "template.txt"

    Thanks guys

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,335

    Re: Print button

    vb.net Code:
    1. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    2.         Dim PrintTextFile As New ProcessStartInfo
    3.         PrintTextFile.UseShellExecute = True
    4.         PrintTextFile.Verb = "print"
    5.         PrintTextFile.WindowStyle = ProcessWindowStyle.Hidden
    6.         PrintTextFile.FileName = "C:\template.txt"
    7.         Process.Start(PrintTextFile)
    8. End Sub

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width