How to move form without form border (visual studio)

后端 未结 9 2054
无人共我
无人共我 2020-12-09 13:38

I am making a windows form application in visual studio 2013 Express. In order to make the application look more customized and attractive, I designed the forms in my applic

9条回答
  •  不思量自难忘°
    2020-12-09 13:48

    'this is Best way

    Dim Pos As Point
    Private Sub Panel1_MouseMove(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles Panel1.MouseMove
        If e.Button = Windows.Forms.MouseButtons.Left Then
            Me.Location += Control.MousePosition - Pos
        End If
        Pos = Control.MousePosition
    End Sub
    

提交回复
热议问题