Print the scrolled content of a windows form
-
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 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?
Read this article. This maybe help you. http://www.codeproject.com/cs/media/IECapture.asp
Visit my blog at http://dotnetforeveryone.blogspot.com/
-
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?
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); }