TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
narasiman rao
NA
519
766.9k
i tried this code but it is not working
Oct 7 2015 12:45 AM
I am capturing the webpage as screen shot and save the screen shot in folder.
Capture image code as follows
protected void btnCapture_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(@"File\ScreenShot.bmp"), ImageFormat.Bmp);
}
But when i run the above code shows error as follows
A generic error occurred in GDI+.
please kindly help me what is the problem in my above code.
Reply
Answers (
1
)
encapsulation and abstraction
How to convert pdf to image in c#