ForeColor property

Returns or sets the color of the line, border, or fill of the Shape object to which the formatting applies. Colors are matched to the closest color on the MapPoint palette. Read/write GeoRGBType.

Applies to

Objects:  FillFormat, LineFormat

Syntax

object.ForeColor

Parameters

Part Description
object Required. An expression that returns a FillFormat or LineFormat object.

Remarks

GeoRGBType is identical to the Visual Basic MsoRGBType.

Example

    Sub ChangeFillColor()

  Dim objApp As New MapPoint.Application   Dim objMap As MapPoint.Map   Dim objLoc As MapPoint.Location
  'Set up application and get a location object   Set objMap = objApp.ActiveMap   objApp.Visible = True   objApp.UserControl = True   Set objLoc = objApp.ActiveMap.GetLocation(0, 0)
  'Create a shape at this location, then zoom to this location   Set objMap.Location = objLoc   objMap.Shapes.AddShape geoShapeOval, objLoc, 50, 30
  'Fill the shape (make fill visible), then change the fill color   objMap.Shapes.Item(1).Fill.Visible = True   objMap.Shapes.Item(1).Fill.ForeColor = vbRed
  End Sub