'將下列Sub放置到  Me.Resize,當控制項變化時會自動調整位置

  Private Sub WindowToCenter()
        Dim sx As Integer = Screen.PrimaryScreen.Bounds.Width
        Dim sy As Integer = Screen.PrimaryScreen.Bounds.Height
        Me.Left = (sx - Me.Width) / 2
        Me.Top = (sy - Me.Height) / 2
    End Sub
文章標籤
全站熱搜
創作者介紹
創作者 colud77 的頭像
colud77

I-Cloud程式攻略

colud77 發表在 痞客邦 留言(0) 人氣(1,161)