Quantcast
Channel: MapWinGIS ActiveX Map and GIS Component
Viewing all articles
Browse latest Browse all 2341

New Post: problem with ShowDialog()

$
0
0
Hello !

I use the last version of mapwingis dll (4.8) and active x control to develop an application in C#.
I need to display winForm when the user click on the map. So, I catch the event "AxMap_MouseDownEvent", I instanciate a state (design pattern state) and I display a messageBox or a personalized form with the method "ShowDialog()" to force the user to give informations.
I have a big problem with this. Sometimes, display a form with "ShowDialog()" causes problem with the map (like this old posts : http://www.mapwindow.org/phorum/read.php?3,16731,16824#msg-16824 ; http://www.mapwindow.org/phorum/read.php?3,18257,18339#msg-18339 ).
More specifically, if I try to move the map with pan, the map returns to its original extent and if I resize the window, the map become Black (big rectangle in black).
When I replace "ShowDialog()" by "Show()" (for personalized form), there is no problem but I need stop the thread to force the user to complete these forms.
I think there is a problem with the fact that stop thread in an event of mapwingis (this is the effect of "ShowDialog()"). This looks suspiciously like a refresh problem but I tried all refresh(), redraw(), focus() and more... Moreover, when there is the problem, if I do Alt/Tab to focus on another window and Alt/Tab again to come back on my application, active X control work again.
The only things I don't understand is why this problem don't occurs always (not in all states but always in the same states). I tried to debug my code during one day to see if there was differences between code but there are none.

Thanks for your help, I'm desperate after one day of debugging.

Tristan

Viewing all articles
Browse latest Browse all 2341

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>