ShowFindDialog method
Opens the Find dialog box. Returns either a Pushpin (if finding a Pushpin) or Location object. Returns Nothing if there is no match.
Applies to
Objects: Map
Syntax
object.ShowFindDialog(Name, [FindState], [HwndParent], [AutoConfirmExactMatch])
Parameters
Part | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
object | Required. An expression that returns a Map object. | ||||||||||||||||||
Name | Required String. Name of the place to search for; similar to typing a place name in the Find dialog box. | ||||||||||||||||||
FindState | Optional GeoFindState. The Find dialog box tab to display. Default value is geoFindDefault.
|
||||||||||||||||||
HWndParent | Optional Long. Handle of the user's window, to allow the Find dialog box to be modal to a window in the calling application, rather than MapPoint.
Note Do not use a handle for a window other than the MapPoint window if the MapPoint window is visible. |
||||||||||||||||||
AutoConfirmExactMatch | Optional Boolean. Hides the Find dialog when an exact match is found. Default is False. |
Remarks
If the FindState parameter is other than geoFindDefault, the string in the Name parameter is use as the entry on the tab of the Find dialog box that's opened.
If the FindState parameter is geoFindlatLong, MapPoint uses the list separator to separate the latitude and longitude coordinates when evaluating the Name parameter. For example, if the comma is designated as the list separator on a user's machine, everything to the left of a comma is considered the latitude coordinate and everything to the right of a comma is considered the longitude coordinate.
To find a collection of locations that are possible find matches to an address; similar to using the Address tab on the Find dialog box, use the FindAddressResults method on the Map object.
To find a Pushpin of a specified name, use the FindPushpin method on the Map object.
To return a collection of locations and Pushpins (FindResults collection) that are possible place and address find matches based on an input string; similar to the Find box on the Navigation toolbar, use the FindResults method on the Map object.
To return a collection of locations and Pushpins (FindResults collection) that are possible find matches based on an input string; similar to the Place tab on the Find dialog box, use the FindPlaceResults method on the Map object.
Example
Sub FindWashingtonMonumentInDialog()
Dim objApp As New MapPoint.Application
'Set up the application
objApp.Visible = True
objApp.UserControl = True
'Display the Find dialog
objApp.ActiveMap.ShowFindDialog "Washington Monument", geoFindPlace
End Sub
Note This sample code is specific for use in MapPoint North America; it is for illustration purposes only.