本文整理汇总了C#中Form1.MoveTo方法的典型用法代码示例。如果您正苦于以下问题:C# Form1.MoveTo方法的具体用法?C# Form1.MoveTo怎么用?C# Form1.MoveTo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Form1
的用法示例。
在下文中一共展示了Form1.MoveTo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Application
//.........这里部分代码省略.........
shadow.AttachToDocument();
#region update
Action update =
delegate
{
dynamic xwlocal = Native.window;
int xwlocal_left = xwlocal.screenLeft;
int xwlocal_top = xwlocal.screenTop;
int xwlocal_innerHeight = xwlocal.innerHeight;
int xwlocal_outerHeight = xwlocal.outerHeight;
int xwlocal_innerWidth = xwlocal.innerWidth;
int xwlocal_outerWidth = xwlocal.outerWidth;
dynamic xw = w;
int xw_left = xw.screenLeft;
int xw_top = xw.screenTop;
int xw_innerHeight = xw.innerHeight;
int xw_outerHeight = xw.outerHeight;
int xw_innerWidth = xw.innerWidth;
int xw_outerWidth = xw.outerWidth;
Console.WriteLine(
new
{
flocal.Left,
xwlocal_left,
xw_left,
xwlocal_innerWidth,
xwlocal_outerWidth,
xw_innerWidth,
xw_outerWidth
}
);
fremote.MoveTo(
flocal.Left + xwlocal_left + (xwlocal_outerWidth - xwlocal_innerWidth) - xw_left - (xw_outerWidth - xw_innerWidth),
flocal.Top + xwlocal_top + (xwlocal_outerHeight - xwlocal_innerHeight) - xw_top - (xw_outerHeight - xw_innerHeight)
);
fremote.SizeTo(
flocal.Width,
flocal.Height
);
shadow.style.SetLocation(
-xwlocal_left - (xwlocal_outerWidth - xwlocal_innerWidth) + xw_left + (xw_outerWidth - xw_innerWidth),
-xwlocal_top - (xwlocal_outerHeight - xwlocal_innerHeight) + xw_top + (xw_outerHeight - xw_innerHeight),
xw_innerWidth,
xw_innerHeight
);
};
flocal.LocationChanged +=
delegate
{
update();
};
flocal.SizeChanged +=
delegate
{
update();
};
update();
Action loop = null;
loop = delegate
{
update();
Native.window.requestAnimationFrame += loop;
};
loop();
#endregion
content.button1.Enabled = true;
}
};
}
);
@"primary screen".ToDocumentTitle();
};
//content.AttachControlTo(page.Content);
content.AttachControlToDocument();
//content.AutoSizeControlTo(page.ContentSize);
}