This is an example of the form I have created. The minimap will show anything that I have drawn in the main area.
Notice the RED COLOR BOX in the minimap. The red color box will follow my mouse cursor once the mouse enter the minimap.
What I wanted to achieve is that I click on any part of the minimap that I wanted, the main form will scroll to the position that I clicked in the minimap. Eg. https://docs.devexpress.com/WindowsForms/17894/Controls-and-Libraries/Map-Control/End-User-Features/Mini-Map
I used AutoScrollPosition
but seems like something wrong with my calculation for coordinate. Any hints or help for calculating the coordinate? Thanks
public void moveTo(double x, double y)
{
/*Calculation for the coordinate*/
panel1.AutoScrollPosition = new Point((int)g, (int)f);
}