User Tools

Site Tools


WinForms Samples

Draw Custom Exception Sample for WinForms

This sample shows how you can suppress and draw exceptions in desktop overlays instead of throwing them. There is a little-known feature in the Map Suite Desktop Edition Overlay class that allows you to draw an exception in the event an exception is thrown during the drawing process. We have a default image we draw in this case; however, you can override this using the DrawExceptionCore method and draw whatever you want. By default we always throw expections, but to start drawing them you can use the Overlay.DrawExceptionMode property.

Please refer to [Wiki]( for the details.


View this sample on Github

map_suite_desktop_for_winforms_miscellaneous_samples.txt · Last modified: 2020/03/08 06:37 (external edit)