suite4.net.FormDatabase Documentation

IGroup.Prev Property

Gets the previous IGroup in the IGroupCollection.

[Visual Basic]
Property Prev As IGroup
[C#]
IGroup Prev {get;}

Property Value

A reference to the previous IGroup, or Null (Nothing in Visual Basic) if the IGroup is the first element of the IGroupCollection.

Example

The following example displays the Name values of all the IForm elements in an IFormCollection.

C# sample

public class Sample
{
    public static void LoadProject()
    {
        suite4.net.FormDatabase.IForm form;
        suite4.net.FormDatabase.IGroup group;
        suite4.net.FormDatabase.IProject project;

        // Load a project from a File
        project = suite4.net.FormDatabase.Project.LoadFromFile(@"C:\sample.fspj");

        // Get the first Group of the Project
        group = project.Groups.First;

        // Get the last Form of the GroupCollection
        form = group.Forms.Last;

        while(form != null)
        {
            System.Console.WriteLine("Display the Name of the form...");
            System.Console.WriteLine(form.Name);
            form = form.Prev;
        }
    }
}
            

VB.Net sample
Public Class Sample
    Public Shared Sub LoadProject()
        Dim form As suite4.net.FormDataMyBase.IForm
        Dim group As suite4.net.FormDataMyBase.IGroup
        Dim project As suite4.net.FormDataMyBase.IProject

        ' Load a project from a File
        project = suite4.net.FormDataMyBase.Project.LoadFromFile("C:\sample.fspj")

        ' Get the first Group of the Project
        group = project.Groups.First

        ' Get the last Form of the GroupCollection
        form = group.Forms.Last

        While Not form Is Nothing
            System.Console.WriteLine("Display the Name of the form...")
            System.Console.WriteLine(form.Name)
            form = form.Prev
        End While
    End Sub
End Class
            

See Also

IGroup Interface | suite4.net.FormDatabase Namespace