2020年8月15日 星期六

vb.net 視窗置中 [Set Windows on screen center]

1
2
3
4
5
        Dim scrHeight As Double = Screen.PrimaryScreen.WorkingArea.Height
        Dim scrWidth As Double = Screen.PrimaryScreen.WorkingArea.Width

        Me.Top = (scrHeight - Me.Height) / 2)
        Me.Left = (scrWidth - Me.Width) / 2)

沒有留言:

張貼留言