|
Ok, this question seems to come up alot so here is the code to get the balloons to pop up for each pushpin on a mappoint map. In Visual Basic make sure you have a Reference to Microsoft Mappoint 9.0 Object Library (North America) I put this code in a command button as an example. Keep in mind there is no error checking here and if you were not running mappoint at all you would get an error.
Private Sub Command1_Click()
Dim objmap As MapPoint.Map
Dim objDataSet As MapPoint.DataSet
Dim objRecordset As MapPoint.Recordset
Set objmap = GetObject(, "MapPoint.Application").ActiveMap
For Each objDataSet In objmap.DataSets
Set objRecordset = objDataSet.QueryAllRecords
Do Until objRecordset.EOF
objRecordset.Pushpin.BalloonState = geoDisplayBalloon
objRecordset.MoveNext
Loop
Next
End Sub |