problem zooming when window minimized

2850
2
10-08-2014 06:03 AM
JeffRogholt
New Contributor II

We're using Developer Kit 10.1 in a vb.net win forms app.  The app listens for messages in the message queue.  The message contains x/y.  When a message is received, the map goes to the location.  When the form is visible/open the zooming works but when form is minimized it does not zoom to the correct location.

These are the steps to reproduce the issue:

Minimize the form

Send a message containing x/y

Restore/open/maximize the form and the map is in the wrong location

Here is a snippet of code:

Private Shared Sub ZoomMap(ByVal map As AxMapControl, _

                            ByVal pt As IPoint)

    Dim mapExtent As IEnvelope

    mapExtent = map.Extent

    mapExtent.CenterAt(pt)

    map.Extent = mapExtent

End Sub

Is this a bug?  Is there another way (not using CenterAt) to get the expected behavior?  Any suggestions or help is appreciated.

Thanks,

Jeff

0 Kudos
2 Replies
JeffRogholt
New Contributor II

anyone have any insight on this?

0 Kudos
AhmedEl-Sisi
Occasional Contributor III

I tested your function with 10.1 and windows forms app with scenario zooming to a specific location using timer.
I press the Zoom button and minimize the window, then maximize it again and it zooms to the right location.
I found no problems with that.
Also you can check this zoom function:
ArcObjects 10 .NET SDK Help

0 Kudos