Results 1 to 4 of 4

Thread: Print

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2005
    Posts
    164

    Print

    i have a web application in vb.2005 with a simple comand button, what code can i put behind the button to make it print the current page, or call up the print dilog box?

  2. #2
    Frenzied Member stimbo's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    1,739

    Re: Print

    To show a print dialog you just use:

    Me.PrintDialog1.ShowDialog()
    Stim

    Free VB.NET Book Chapter
    Visual Basic 2005 Cookbook Sample Chapter

  3. #3
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: Print

    vb Code:
    1. private sub lbPrint_Click(s as sender,e as system.EventArgs)
    2. {
    3. Page.RegisterStartupScript("PrintPage","<script language='javascript'>window.print()</script>")
    4. }
    Please mark you thread resolved using the Thread Tools as shown

  4. #4
    Frenzied Member stimbo's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    1,739

    Re: Print

    The WebBrowser has a .Print function but I've never used it.
    Stim

    Free VB.NET Book Chapter
    Visual Basic 2005 Cookbook Sample Chapter

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