Click here to Skip to main content
11,920,394 members (58,442 online)
Rate this:
Please Sign up or sign in to vote.
See more: image Image-Recognition , +
i am having an image1 in a picturebox1 and another image2 on another picturebox2, i want to put image2 from picturebox2 on image1 in picturebox1.
i am using c# language.

plz any one help me in this regard.if code provided i will be greatly thankful
Posted 12-Jun-11 6:38am
SAKryukov 12-Jun-11 14:36pm
Tag platform and language, to get a real answer.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

That's going to depend on what you mean by "put an image on an image".
If you mean "draw an image on part of another image, destroying what is underneath" then all you need to do is:
using (Graphic g = Graphics.FromImage(myTargetPictureBox.Image))
   g.DrawImage(mySourcePictureBox.Image, new Point(100,100));
asma89 12-Jun-11 12:26pm
Thanks for your kind concern but its not working its not giving any error but when i click the picturebox the image is not drawn on another image in another picturebox.

what should i do ?
SAKryukov 12-Jun-11 14:36pm
It does work. If it does not work for you, show a bigger part of code.
SAKryukov 12-Jun-11 14:38pm
For example, your original point of second image can be outside of the clip area of the first one; could be different reasons. Check up the geometry and show your code.
SAKryukov 12-Jun-11 14:37pm
Correct, a 5.

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

  Print Answers RSS
0 OriginalGriff 415
1 phil.o 170
2 Dave Kreskowiak 155
4 F-ES Sitecore 130
0 OriginalGriff 6,778
1 KrunalRohit 4,495
2 Sergey Alexandrovich Kryukov 3,203
3 George Jonsson 2,805
4 Suvendu Shekhar Giri 2,181

Advertise | Privacy | Mobile
Web02 | 2.8.151120.1 | Last Updated 12 Jun 2011
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100