In a VS 19 project the main form has a pictureBox control. For test purposes I used a button to add a map image from a png file and another button to add small rectangles representing waypoints, from co-ordinate data displayed in a textBox control on the form. This worked perfectly by clicking the buttons in order. When I decided to combine the process with a single click, however, the map terrain was visible but not the waypoints. If I bypassed the loading of the map, the waypoints were displayed. Any suggestions?
Loading
David BroughtonPosted Oct 16, 2023, 8:20 AM
I've solved my own problem by creating a bitmap using the map image, creating a graphics object from that, applying the waypoints to the graphics object. Finally the pictureBox.Image was set to the bitmap.