I am using the following code to move a border less form and it works just fine, however when I double click anywhere on the form, the form is maximized, how do I stop this happening?
vb Code:
Const WM_NCHITTEST As Integer = &H84 Const HTCLIENT As Integer = &H1 Const HTCAPTION As Integer = &H2 Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message) Select Case m.Msg Case WM_NCHITTEST MyBase.WndProc(m) If m.Result = HTCLIENT Then m.Result = HTCAPTION Case Else 'Make sure you pass unhandled messages back to the default message handler. MyBase.WndProc(m) End Select End Sub




Reply With Quote