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
manuel
NA
68
0
merge 2 images side by side inted of capture screen
Apr 15 2018 5:41 AM
hi is there onother way to save pictureBox1+pictureBox2 side by side instead of taking snapshot?
int x = 10; // Where inside the form do you want to take a snapshot
int y = 35; // Where inside the form do you want to take a snapshot
int width = 470; // width of snapshot
int height = 385; // height of snapshot
int formLocX = this.Location.X; // Where is the form on the desktop?
int formLocY = this.Location.Y; // Where is the form on the desktop?
int offsetX = this.Size.Width - this.DisplayRectangle.Width; // this is the offset, i.e. the border
int offsetY = this.Size.Height - this.DisplayRectangle.Height; // this is the offset, i.e. the border
x = x + formLocX + offsetX; // Add where you want the screenshot taken with its location and the offset
y = y + formLocY + offsetY; // Add where you want the screenshot taken with its location and the offset
Bitmap bmp = new Bitmap(width, height, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
Graphics g = Graphics.FromImage(bmp);
g.CopyFromScreen(x, y, 0, 0, bmp.Size, CopyPixelOperation.SourceCopy);
pictureBox1.Image = bmp;
Reply
Answers (
2
)
Viewing Class In Windows Form Application
Need my Image picturebox resizable