CurrentPage Property
Sets or returns the index of the current page in the active form. The default value is 0.
public int CurrentPage {
get,
set
}
Remarks
This property is used for form pagination. Only the current page of the active form is stored.
Example
The following example demonstrates how to use the CurrentPage property to display the current page number.
Sub Form_Paginated(sender As Object, e As EventArgs)
Label1.Text = "Page no is " + Form1.CurrentPage.ToString()
End Sub 'Form_Paginated
Sub OnCmdClick1(sender As Object, e As EventArgs)
Form1.CurrentPage = 2
End Sub
[C#]
void Form_Paginated(object sender, EventArgs e)
{
Label1.Text = "Page no is " + Form1.CurrentPage;
}
void OnCmdClick1(Object sender, EventArgs e)
{
Form1.CurrentPage = 2;
}
See Also
Applies to: Form Class