Forums - C# Corner

Forum guidelines
arian gerryts

arian gerryts

  • 1.4k
  • 3
  • 3.8k

Adding a mouse click eventhandler to a PictureBox

Nov 19 2012 8:53 AM
Hi there

I have a picturebox control and upon clicking it another PictureBox appears at a specific location. I.o.w it wasnt added from the toolbox.

PictureBox picOneFaceUpA = new PictureBox();
picOneFaceUpA.Location = new Point(42, 202);
picOneFaceUpA.Width = 90;
picOneFaceUpA.Height = 120;
picOneFaceUpA.Image = Image.FromFile("../../Resources/" + picFaceUpToBeMoved[0] + ".png"); Controls.Add(picOneFaceUpA);

How would I add a MouseClick eventhandler to this control?


Answers (1)

File APIs for .NET
Aspose are the market leader of .NET APIs for file business formats – natively work with DOCX, XLSX, PPT, PDF, MSG, MPP, images formats and many more!