Public Class Form1 Protected Overrides Sub WndProc(ByRef m As Message) Const WM_LBUTTONDOWN As Integer = &H201 Const WM_PARENTNOTIFY As Integer = &H210 If m.Msg = WM_LBUTTONDOWN Then ActiveControl = Nothing ElseIf m.Msg = WM_PARENTNOTIFY Then If (m.WParam.ToInt32() And &HFFFFI) = WM_LBUTTONDOWN Then ActiveControl = Nothing End If End If MyBase.WndProc(m) End Sub End Class