This sample resizes the workspace and moves the top left corner of the workspace to a point on the screen.
Set Workspace Size and Position |
Copy Code
|
---|---|
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Drawing; using Attachmate.Reflection.Framework; using Attachmate.Reflection.UserInterface; namespace ScreenScrape { class Program { static void Main(string[] args) { //Start a visible instance of Reflection or get the instance running at the given channel name Application app = MyReflection.CreateApplication("myWorkspace", true); IFrame frame = (IFrame)app.GetObject("Frame"); //Resize the workspace width and height to 640 x 480 pixels System.Drawing.Size s = frame.WindowSize; s.Width = 640; s.Height = 480; frame.WindowSize = s; //Change the workspace window location by assigning the location of the left corner of the workspace to a point System.Drawing.Point p = new Point(30, 30); frame.WindowLocation = p; } } } |