Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Print the scrolled content of a windows form

Print the scrolled content of a windows form

Scheduled Pinned Locked Moved C#
questioncsharpsysadminhelp
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pranu_13
    wrote on last edited by
    #1

    I have a windows application in .net 2.0. I use a webbrowser control to display an asp page which is on server. Below the browser control i display an electronic signature. My requirement is to print this form. I tried to use the memorygraphics class and take the screenshot of the form and draw the image to printer. But this gives me only the part of the form visible on the client area. The part which is visible on scrolling the form is left. I need the complete form along with the scrolled part. How do i do this? Can any one help me?

    I H 2 Replies Last reply
    0
    • P pranu_13

      I have a windows application in .net 2.0. I use a webbrowser control to display an asp page which is on server. Below the browser control i display an electronic signature. My requirement is to print this form. I tried to use the memorygraphics class and take the screenshot of the form and draw the image to printer. But this gives me only the part of the form visible on the client area. The part which is visible on scrolling the form is left. I need the complete form along with the scrolled part. How do i do this? Can any one help me?

      I Offline
      I Offline
      il_masacratore
      wrote on last edited by
      #2

      Read this article. This maybe help you. http://www.codeproject.com/cs/media/IECapture.asp

      Visit my blog at http://dotnetforeveryone.blogspot.com/

      1 Reply Last reply
      0
      • P pranu_13

        I have a windows application in .net 2.0. I use a webbrowser control to display an asp page which is on server. Below the browser control i display an electronic signature. My requirement is to print this form. I tried to use the memorygraphics class and take the screenshot of the form and draw the image to printer. But this gives me only the part of the form visible on the client area. The part which is visible on scrolling the form is left. I need the complete form along with the scrolled part. How do i do this? Can any one help me?

        H Offline
        H Offline
        Herman T Instance
        wrote on last edited by
        #3

        Button btnPrint = new Button(); btnPrint.Visible = false; btnPrint.Enabled = true; btnPrint.Click += new EventHandler(btnPrint_Click); btnPrint_Click(sender, e); ... ... private void btnPrint_Click(object sender, EventArgs e) { String Script = String.Empty; Script = ""; Script += "window.print();window.close();"; Script += ""; ClientScript.RegisterStartupScript(this.GetType(), "print", Script); }

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups