本文整理汇总了C#中Form.Move方法的典型用法代码示例。如果您正苦于以下问题:C# Form.Move方法的具体用法?C# Form.Move怎么用?C# Form.Move使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Form
的用法示例。
在下文中一共展示了Form.Move方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Fun
/// <summary>
/// Included for API test stability purposes. Moves a Ranorex.Form such as a browser window down and up quickly four times.
/// </summary>
/// <param name="form">The Ranorex.Form to move.</param>
protected void Fun(Form form)
{
int currentXCor = form.Element.ScreenLocation.X;
int currentYCor = form.Element.ScreenLocation.Y;
for (int l = 1; l <= 4; l++)
{
for (int i = 1; i <= 100; i++)
{
form.Move(currentXCor + i, currentYCor + i);
Ranorex.Delay.Milliseconds(1);
}
currentXCor = form.Element.ScreenLocation.X;
currentYCor = form.Element.ScreenLocation.Y;
for (int i = 1; i <= 100; i++)
{
form.Move(currentXCor - i, currentYCor - i);
Ranorex.Delay.Milliseconds(1);
}
currentXCor = form.Element.ScreenLocation.X;
currentYCor = form.Element.ScreenLocation.Y;
}
}
示例2: Move
/// <summary>
/// Move a Ranorex.Form such as a browser window.
/// </summary>
/// <param name="form">The Ranorex.Form to move</param>
/// <param name="x">Adds this paramter to the Ranorex.Form current screen location x-coordinate.</param>
/// <param name="y">Adds this paramter to the Ranorex.Form current screen location y-coordinate.</param>
protected void Move(Form form, int x, int y)
{
int currentXCor = form.Element.ScreenLocation.X;
int currentYCor = form.Element.ScreenLocation.Y;
form.Move(currentXCor + x, currentYCor + y);
}