Click here to Skip to main content
12,999,081 members (48,221 online)
Rate this:
Please Sign up or sign in to vote.
See more: , +
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 5: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:37pm
Correct, a 5.
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.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170622.1 | Last Updated 12 Jun 2011
Copyright © CodeProject, 1999-2017
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