Reflection .NET API
Attachmate.Reflection Assembly / Attachmate.Reflection.UserInterface Namespace / IFrame Interface / WindowState Property
Example


In This Topic
    WindowState Property
    In This Topic
    Gets or sets the application window state. The window state can be Normal, Minimized, or Maximized.
    Syntax
    'Declaration
     
    
    Property WindowState As FormWindowState
    'Usage
     
    
    Dim instance As IFrame
    Dim value As FormWindowState
     
    instance.WindowState = value
     
    value = instance.WindowState
    FormWindowState WindowState {get; set;}

    Property Value

    The default is Normal (a default sized window).
    Example

    void Sample_Frame_WindowState()
    {
        Application app = MyReflection.ActiveApplication;
        IFrame frame = (IFrame)app.GetObject("Frame");
     
        Console.Write("Press 'm' to maximize the Reflection Desktop window...");
        ConsoleKeyInfo cki = Console.ReadKey();
        if (cki.KeyChar == 'm')
            frame.WindowState = System.Windows.Forms.FormWindowState.Maximized;
        else
            frame.WindowState = System.Windows.Forms.FormWindowState.Normal;
    }
    See Also