WinForms - PictureBox and Drawing lines


Hello, I have a project that implements Dijkstra's shortest path algorithm. It is a console app, and I am now attempting to convert it to a Win Forms app. I have virtually no experience with Forms but I have been finding what I need on my own. What I would like to do is be able to:

1: draw the path as lines connecting nodes on a map image.
2: set window/image position where path is visible in window(image is ~2900X2600)

Any suggestions on how to accomplish this is greatly appreciated.
What are you using on the console app to draw the lines? After you have the rendering context from windows you should be able to use the same lib just in a slightley different way.
Computergeek01 wrote:
What are you using on the console app to draw the lines?


Sorry, I should have been more descriptive. The console version simply takes as input source and destination node numbers, passes those nodes to a class to do the calculations which returns a list of nodes in the path. The nodes name which are strings are then displayed to the console. With the Form I would like to display the same text output as the console version to a list box, this is done and working. In addition to that output I would like a PictureBox (or whatever control makes most sense) in another form to display a map image and draw a line from node to node in the result path. This is a large image, and I would like the image roughly centered on the area of the path, preferably with entire path visible or at very least the start position. Again, I know very little of Forms/MFC/ATL/... other then making a simple interface for a base conversion tool I wrote.

@webJose Ill take a look into that, thank you.
Topic archived. No new replies allowed.