Private Const WM_NCLBUTTONDOWN As Long = &HA1
Private Const WM_NCLBUTTONUP As Long = &HA0
Protected Overrides Sub DefWndProc(ByRef m As System.Windows.Forms.Message)
' -- You might want to trap for user clicking, min, max or close and ignore
' -- Trap left mouse click down on titlebar
If CLng(m.Msg) = WM_NCLBUTTONDOWN Then
' -- Set the forms opacity
If Me.Opacity <> 0.5 Then Me.Opacity = 0.5
' -- Trap left mouse click up on titlebar
ElseIf CLng(m.Msg) = WM_NCLBUTTONUP Then
If Me.Opacity <> 1.0 Then Me.Opacity = 1.0
End If
' -- Business as usual
MyBase.DefWndProc(m)
End Sub
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.