将表单移动到右上角 [英] move form to the top right corner
本文介绍了将表单移动到右上角的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在表单加载时将表单移动到屏幕的右上角..请帮助
how to move the form to the top right corner of the screen on form load..please help
推荐答案
处理FormShown事件并设置Location属性:
Handle the FormShown event and set the Location property:
private void frmMain_Shown(object sender, EventArgs e)
{
Location = new Point(Screen.PrimaryScreen.WorkingArea.Width - Width, 0);
}
对不起 - 没注意到VB ......
[edit]
Sorry - didn't notice the VB...
Private Sub frmMain_Shown(sender As Object, e As EventArgs) Handles frmMain.Shown
Location = New Point(Screen.PrimaryScreen.WorkingArea.Width - Width, 0)
End Sub
[/ edit]
[/edit]
设定表格
1)StartPosition = Manual
2)location =(0,0)
来自房产小组。
set form
1) StartPosition=Manual
2) location=(0,0)
from properties panel.
这篇关于将表单移动到右上角的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文