Line property

Returns the LineFormat object that contains the line formatting properties for the specified shape. Read-only.

Applies to

Objects: Shape

Syntax

object.Line

Parameters

Part

Description

object

Required. An expression that returns a Shape object.

Example

  Sub ChangeLineColor()

  Dim objApp As New MapPoint.Application
  Dim objMap As MapPoint.Map
  Dim objLoc1 As MapPoint.Location
  Dim objLoc2 As MapPoint.Location

  'Set up the application
  Set objMap = objApp.ActiveMap
  objApp.Visible = True
  objApp.UserControl = True

  'Get two locations and zoom in
  Set objLoc1 = objMap.FindResults("Seattle, WA").Item(1)
  Set objLoc2 = objMap.FindResults("Redmond, WA").Item(1)
  Set objMap.Location = objLoc1

  'Create a line, then use the line property to change its color
  objMap.Shapes.AddLine objLoc1, objLoc2
  objMap.Shapes.Item(1).Line.ForeColor = vbRed

  End Sub

Note   This sample code is specific for use in MapPoint North America; it is for illustration purposes only.