ArcGIS Engine does not provide the click query command in mapcontrol, but only provides the click query command used in readercontrol. The following code implements click query and flashing code.
Process description
Private sub mapcontrolpoliconmousedown (byval button as long, byval shift as long, byval X as long, byval y as long, byval MapX as double, byval mapy as double)
Dim pmap as IMAP
Dim I as integer
Dim Ppoint as ipoint
Set pmap = mapcontrol1.map
Set Ppoint = mapcontrol1.activeview. screendisplay. displaytransformation. tomappoint (x, y)
Dim pidentify as iidentify
Dim pidarray as iarray
Dim pfeatidobj as ifeatureidentifyobj
Dim pidobj as iidentifyobj
Set pidentify = pmap. layer (1)
Dim penv as ienvelope
Set penv = new envelope
Set penv = mapcontrol1.activeview. Extent
Penv. Height = 100
Penv. width = 100
Penv. centerat Ppoint
Set pidarray = pidentify. Identify (penv)
If not pidarray is nothing then
Set pfeatidobj = pidarray. element (0)
Set pidobj = pfeatidobj
Pidobj. Flash mapcontrol1.activeview. screendisplay
'Message display query target information
Msgbox "layer:" & pidobj. layer. Name & vbnewline & "feature:" & pidobj. Name
Else
Msgbox "No feature identified ."
End if
End sub