Share via


Tablets.TabletsEnumerator.MoveNext Method

Moves the enumerator index to the next object in the collection.

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

Syntax

'Declaration
Public Function MoveNext As Boolean
'Usage
Dim instance As Tablets.TabletsEnumerator 
Dim returnValue As Boolean 

returnValue = instance.MoveNext()
public bool MoveNext()
public:
virtual bool MoveNext() sealed
public final function MoveNext() : boolean

Return Value

Type: System.Boolean
Set to true if the index position references an object; false if the index position references the end of the collection.

Implements

IEnumerator.MoveNext()

Remarks

The Tablets.TabletsEnumerator supports iterating over a Tablets collection and implements the IEnumerator interface.

This method inherits from MoveNext.

Examples

This example uses the IEnumerator for the Tablets collection to iterate over the Tablets collection, allTablets, and populate the ListBox object listBoxTablets with the names of each tablet device that is attached to the system.

' Calling the constructor automatically fills the  
' Tablets collection with the available Tablet objects. 
Dim allTablets As Tablets = New Tablets()

' clear the list box 
Me.listBoxTablets.Items.Clear()

' populate the list box with the name of each tablet 
' version using GetEnumerator() 
Dim theTabletsEnumerator As IEnumerator = allTablets.GetEnumerator()
While (theTabletsEnumerator.MoveNext())
    Dim T As Tablet = theTabletsEnumerator.Current
    Me.listBoxTablets.Items.Add(T.Name)
End While
// Calling the constructor automatically fills the  
// Tablets collection with the available Tablet objects.
Tablets allTablets = new Tablets();

// clear the list box 
this.listBoxTablets.Items.Clear();

// populate the list box with the name of each tablet 
// version using GetEnumerator()
IEnumerator theTabletsEnumerator = allTablets.GetEnumerator();
while (theTabletsEnumerator.MoveNext())
{
    Tablet T = (Tablet)theTabletsEnumerator.Current;
    this.listBoxTablets.Items.Add(T.Name);
}

Platforms

Windows 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

Tablets.TabletsEnumerator Class

Tablets.TabletsEnumerator Members

Microsoft.Ink Namespace

Tablets