当前位置: 首页>>代码示例>>C#>>正文


C# Form.Move方法代码示例

本文整理汇总了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;
            }
        }
开发者ID:svatarlea,项目名称:test,代码行数:30,代码来源:BrowserBasic.cs

示例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);
        }
开发者ID:svatarlea,项目名称:test,代码行数:13,代码来源:BrowserBasic.cs


注:本文中的Form.Move方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。