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.2k
when i execute the below code it is not working in server
Oct 21 2013 8:55 AM
My code as follows
Bitmap bitmap = new Bitmap(990, 540);
Graphics graphics = Graphics.FromImage(bitmap as System.Drawing.Image);
graphics.CopyFromScreen(5, 160, 0, 0, bitmap.Size);
bitmap.Save(@"c:\\" + ddlSession.Text.ToString().Trim() + "DailySchedule.bmp", ImageFormat.Bmp);
ShowEditLink(true);
lblUpdate.Text = "This image is saved";
The above code is working in local machine, but when i execute on the server error as follows
System.ComponentModel.Win32Exception: The handle is invalid
The below error shows in following line as follows
graphics.CopyFromScreen(5, 160, 0, 0, bitmap.Size);
please help me. what is the problem in my code.
Regards,
Rao.
Reply
Answers (
1
)
c# Treeview
This is about writing programmes and Web Services in C#