I have converted postcode boundary polygons to point data (point[] for each polygon) from GIS Shape Files.
I am wanting to show this in a c# windows forms application.
I have managed to show this using the System.Drawing
(GDI+) DrawPolygon() method.
Graphics g = this.CreateGraphics();
Pen pen = new Pen(Color.Black);
Brush brush = new SolidBrush(Color.FromArgb(255,255,o));
PointF[] ptr = { point data here };
g.FillPolygon(brush, ptr);
g.DrawPolygon(pen, ptr);
Is it possible to add events to a drawn polygon? If so how do I do this for individual polygons. For example, click on a postcode polygon and a messagebox shows information about the postcode.
Secondly, would it be easier to make a custom control inheriting the winforms panel. Is there a way to shape the border of a winforms panel control using a set of points?
Postcode objects are serialised and stored in the filesystem.