如何使表格“对齐"到另一种形式的屏幕边缘? [英] How to Make Form "Snap" to the Screen Edge of Another Form?
本文介绍了如何使表格“对齐"到另一种形式的屏幕边缘?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好...
如何使表格按扣"
有没有办法在C#上做到这一点?
谢谢.
Hi...
How to Make Form "Snap" to the Screen Edge of Another Form?
Is there are way to do it on C#?
Thanks.
推荐答案
使用以下代码将表单捕捉到主表单的左上角:
Use this code to snap a form to the upper left corner of the main form:
表格 f1 = 新 表格 ();
Form f1 = new Form();
f1.StartPosition = FormStartPosition .Manual;
f1.StartPosition = FormStartPosition.Manual;
f1.Location = 新 点 ( 此 .Location.X, this .Location.Y);
f1.Location = new Point(this.Location.X, this.Location.Y);
f1.Show( );
f1.Show();
这篇关于如何使表格“对齐"到另一种形式的屏幕边缘?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文