Navigation button with vb / c # image

I am working on a mapped DVR / cctv UI.
I did it myself, so I did not use the Google API. I just cut off most of the map where I need it.

therefore, if I have a really really big map, then it will not correspond to my resolution, I did not find the code to move the image inside the pictureBox, but I did to move the pictureBox inside the panel. then it looked like a map with borders. :)

now, I want to be able to save / attach this button to the image .. so whenever I move the pictureBox, the button is combined with it. even if it goes beyond the scope of the form, but when I drag it back, it appears where it was said, attached just to imagine a button, such as a googlemap marker. what i wanted to happen.

its like i'm creating my own google offline map ..

enter image description here

If you have any questions, feel free to ask. TIA

+3
source share
1 answer

Just add your button as a child of your image:

button1.Parent = pictureBox1;
//or
pictureBox1.Controls.Add(button1);

Location , , , .

, :

Point loc = pictureBox1.PointToClient(button1.PointToScreen(Point.Empty));
button1.Parent = pictureBox1;
button1.Location = loc;
+2

All Articles