I'm trying to place red crosses when the user double click on the screen. So I have a picture box that extract X and Y position when we double click on it. (with a GetX() & GetY()) function.
I'm trying to dynamically create a picture box and fill it with my "cross.png" file. Here's what I've tried so far :
Dim pb As New PictureBox
pb.Width = 100 'or whatever
pb.Height = 200
pb.Top = 50 'or whatever
pb.Left = 50
pb.ImageLocation = "C:\Users\Over_\Desktop\proto_mini_project_-_face_recognition (1)\proto mini project - face recognition\proto mini project - face recognition\cross.png"
Me.Controls.Add(pb)
I've found this solutions on StackOverflow but I don't really understand how to use it, or maybe I'm missing something. Alose I execute this part of the code in :
Private Sub PictureBox2_Click(sender As Object, e As EventArgs) Handles faceImage.DoubleClick
If anyone got an idea/solution I would gladly take it. Kind regards, Mehdi.