Share via


Strokes.Add Method (Stroke)

Adds a Stroke object to the Strokes collection.

Namespace: Microsoft.Ink
Assembly: Microsoft.Ink (in microsoft.ink.dll)

Syntax

'Declaration
Public Function Add ( _
    stroke As Stroke _
) As Integer
'Usage
Dim instance As Strokes
Dim stroke As Stroke
Dim returnValue As Integer

returnValue = instance.Add(stroke)
public int Add (
    Stroke stroke
)
public:
int Add (
    Stroke^ stroke
)
public int Add (
    Stroke stroke
)
public function Add (
    stroke : Stroke
) : int
Not applicable.

Parameters

Return Value

This method always returns a value of -1.

Remarks

The Stroke object must already exist within the Ink object and cannot belong to another Ink object. In addition, this method does not copy or otherwise alter the Ink object, but merely adds this Stroke to the Strokes collection.

Example

This C# example adds the Stroke object, theNewStroke to the Strokes collection in the Ink object, theInk.

theInk.Strokes.Add(theNewStroke);

This Microsoft Visual Basic.NET example adds the Stroke object, theNewStroke to the Strokes collection in the Ink object, theInk.

theInk.Strokes.Add(theNewStroke)

Platforms

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

Strokes Class
Strokes Members
Microsoft.Ink Namespace
Stroke