Programming for GIS > Programming with MapObjects

zoom tools with MapObjects - Need help.


i'm using Mapobject with visual basic in my project...actually i want to know if  there are any command can be used for zoom in and zoom out using command box without using toolbar.


There are a couple of samples from, have you taken a look at them?

If I can remember properly, there are a couple of good samples in the book provided with the software. Do you have access to that book?


Hi there

In my experience, the alternative solutions to learn MapObjects is to refer the object model diagrams rather than "editing" exiting sample code provided.

See C:\Program Files\ESRI\MapObjects2\Samples\Diagram\Mo20Diag.pdf.

The diagram represent the type of MapObjects libaries and their relationship, and from there u can find a lot of information to program ur application

e.g of code

Private Sub Map1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)

'Basic zoom/pan tool
If Shift = 0 Then
  If Button = 1 Then
   Set Map1.Extent = Map1.TrackRectangle
  End If
  If Button = 1 Then
    Dim rect As New MapObjects2.Rectangle
     Set rect = Map1.Extent
     rect.ScaleRectangle (1.2)
     Set Map1.Extent = rect
     Set Map1.Extent = Map1.FullExtent
  End If
End If

End Sub

Thanks NetGIS,

Also guys when you post a question, please be specific in the question. The above post has been changed from "please help me" to zoom tools with MapObjects - Need help.


[0] Message Index

Go to full version