ضع هذا الكود في منطقة الكلاس وشغل الفورم
وبعدين حركها او حاول تغير حجمها
Private Const WM_NCLBUTTONDOWN As Long = &HA1 Private Const WM_NCLBUTTONUP As Long = &HA0 Private Const WM_MOVING As Long = &H216 Private Const WM_SIZE As Long = &H5 Protected Overrides Sub DefWndProc(ByRef m As System.Windows.Forms.Message) Static LButtonDown As Boolean 'Check the state of the Left Mouse Button If CLng(m.Msg) = WM_NCLBUTTONDOWN Then 'set LButtonDown to True is Left Mouse Button is down LButtonDown = True ElseIf CLng(m.Msg) = WM_NCLBUTTONUP Then 'set LButtonDown to False is Left Mouse Button is not down LButtonDown = False End If If LButtonDown Then If CLng(m.Msg) = WM_MOVING Then 'Set the forms opacity to 50% if user is draging the window If Me.Opacity <> 0.5 Then Me.Opacity = 0.5 ElseIf CLng(m.Msg) = WM_SIZE Then 'Set the forms opacity to 50% if user is resizing the window If Me.Opacity <> 0.5 Then Me.Opacity = 0.5 End If ElseIf Not LButtonDown Then If Me.Opacity <> 1.0 Then Me.Opacity = 1.0 End If MyBase.DefWndProc(m) End Sub