Using AE to create a bubble prompt box-VB. Net source code
Address: http://www.cnblogs.com/wall/archive/2008/07/17/1244942.html
''' <Summary>
''' Create a text prompt box
''' </Summary>
''' <Param name = "x"> the X coordinate of the position marked by the prompt box </param>
''' <Param name = "y"> Y coordinate of the position marked by the prompt box </param>
''' <Param name = "pTextString"> text displayed in the prompt box </param>
''' <Param name = "pPoint"> point pointed by the arrow in the prompt box </param>
''' <Param name = "pGraphicsContainer"> graphicscontainer containing the prompt box </param>
''' <Returns> </returns>
''' <Remarks> </remarks>
Public Function
CreateTextElement (ByVal x As Double, ByVal y As Double, ByVal
PTextString As String, Optional ByVal pPoint As IPoint = Nothing,
Optional ByVal pGraphicsContainer As IGraphicsContainer = Nothing)
IElement
Dim pElement As IElement = New MarkerElementClass ()
Dim pTElement As IElement = New TextElementClass ()
Dim pTextSymbol As IFormattedTextSymbol = New TextSymbolClass ()
Dim pBalloonCallout As IBalloonCallout = CreateBalloonCallout (x, y)
Dim pColor As IRgbColor = New RgbColorClass ()
PColor. red= 150
PColor. Green = 0
PColor. Blue = 0
PTextSymbol. Color = pColor
Dim pTextBackground As ITextBackground
PTextBackground = pBalloonCallout
PTextSymbol. Background = pTextBackground
PTextSymbol. Size = 8
CType (pTElement, ITextElement). Symbol = pTextSymbol
CType (pTElement, ITextElement). Text = pTextString
If pPoint Is Nothing Then pPoint = New Point: pPoint. PutCoords (x + Const_Dis, y + Const_Dis)
PTElement. Geometry = pPoint
PGraphicsContainer. AddElement (pTElement, 1)
Return pTElement
End Function
''' <Summary>
''' Create a balloon prompt box
''' </Summary>
''' <Param name = "x"> X coordinate of the position of the prompt box </param>
''' <Param name = "y"> Y coordinate of the prompt box </param>
''' <Returns> </returns>
''' <Remarks> </remarks>
Public Function CreateBalloonCallout (ByVal x As Double, ByVal y As Double) As IBalloonCallout
Dim pRgbClr As IRgbColor = New RgbColorClass ()
PRgbClr. red= 255
PRgbClr. Blue = 255
PRgbClr. green= 255
Dim pSmplFill As ISimpleFillSymbol = New SimpleFillSymbolClass ()
PSmplFill. Color = pRgbClr
PSmplFill. Style = esriSimpleFillStyle. esriSFSSolid
Dim pBllnCallout As IBalloonCallout = New BalloonCalloutClass ()
PBllnCallout. Style = esriBalloonCalloutStyle. esriBCSRoundedRectangle
PBllnCallout. Symbol = pSmplFill
PBllnCallout. LeaderTolerance = 1
Dim pPoint As IPoint = New ESRI. ArcGIS. Geometry. PointClass ()
PPoint. X = x
PPoint. Y = y
PBllnCallout. AnchorPoint = pPoint
Return pBllnCallout
End Function