在全局中用VB.NET 定义一个启动窗体,结果怎么调都没法居中,
BeforeOpenProject
Dim frm As New FormReg
frm.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
frm.TopMost = True '或 e.HideSplashForm = True
frm.ShowDialog() '模式打开
'Me.Top = (My.Computer.Screen.Bounds.Height - Me.Height) / 2 '绝对居中
'Me.Left = (My.Computer.Screen.Bounds.Width - Me.Width) / 2
用此方法 可以居中,不过启动时有 位移闪动!
代码都是从网上找到,实在找不到解决方法了,求老师们给指教下。
[此贴子已经被作者于2014-4-3 19:32:40编辑过]