How to draw in main window (map) while a dialog box is open (focus issue)?

Discussion created by zetar on Mar 5, 2013
This is mostly a debugging issue, but any thoughts would be appreciated.

I've got a dialog box open that is loading shapefiles. I would like to draw on the main window (the points of the shapefile) while the dialog box is still open. The dialog box (I assume) has the focus. So, my usually call to draw a dot on the map (which normally works just fine) isn't being drawn.

So the question is:
How can I temporarily set the focus back to the main window that displays the map so I can draw a dot on the map while the dialog box/form is still open? (Also set the focus back to the dialog box when the drawing is completed?)

FYI: I'm using two monitors and the dialog box is actually on the other monitor so we don't have to worry about drawing over the dialog box.

Any suggestions would be appreciated.

I solved this problem by making the dialog box modeless.