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
Amit Ziv
NA
40
8.6k
printscreen a panel control
Apr 12 2014 8:04 AM
Hi, im doing a paint program and it all works perfectly
except for the save image thingy...
i got this code, but it just saves the control without the graphics i paint on top (with pen):
any ideas? pls?
ImageFormat img; Bitmap bt; Graphics screenShot;
private void button1_Click(object sender, EventArgs e)
{
if (saveFileDialog1.ShowDialog() == DialogResult.OK)
{
img = ImageFormat.Jpeg;
bt = new Bitmap(panel1.Width, panel1.Height, PixelFormat.Format16bppGrayScale);
screenShot = Graphics.FromImage(bt);
screenShot.CopyFromScreen(panel1.Location.X, panel1.Location.Y, panel1.Width, panel1.Height, panel1.Bounds.Size, CopyPixelOperation.SourceCopy);
}
bt.Save(saveFileDialog1.FileName, img);
}
Reply
Answers (
5
)
How can we read sms using mobile devivce to my web project
How to call back method in JavaScript?