Click here to Skip to main content
15,881,812 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
My Code as follows
C#
protected void btnCaptures_Click(object sender, EventArgs e)
   {
           Bitmap bitmap = new Bitmap
          (System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width,           System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height);
           Graphics graphics = Graphics.FromImage(bitmap as System.Drawing.Image);
           graphics.CopyFromScreen(0, 0, 0, 0, bitmap.Size);
           bitmap.Save(Server.MapPath(@"Screen\ScreenShot2.Bmp"), ImageFormat.Bmp);
   }

I tried my above serveral times, but when i run the above code in Screen folder copy fromscreen full height i cannot able to get.

for that getting a full height from copyfromscreen what changes i want to go in above code.
Posted
Updated 11-Oct-15 20:38pm
v2
Comments
Bernhard Hiller 12-Oct-15 3:50am    
"Server.MapPath" - What are you doing with this piece code???
Are you using Windows Forms or ASP.Net?
[no name] 12-Oct-15 13:18pm    
i am using ASP.Net page using C3.kindky please help me to get the full screen as output
Sergey Alexandrovich Kryukov 12-Oct-15 11:05am    
Why bitmap as System.Drawing.Image? It is already System.DrawingImage, if it is System.Drawing.Bitmap, of course...
—SA
Richard Deeming 14-Oct-15 9:58am    
REPOST
You have already posted this question:
http://www.codeproject.com/Questions/1037860/how-to-take-screen-shot-of-full-height-in-web-page[^]

The answer has not changed.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900