Thank you all for your help.
It's working now.
DECLARATIONS
CODECode:Declare Function SendMessage Lib "User32" Alias "SendMessageA" (ByVal hWnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, ByVal lParam As Integer) As Integer Const WM_NCLBUTTONDOWN As Integer = &HA1 Const HTCAPTION As Integer = 2
I share the result with you!Code:Private Sub Form1_MouseDown(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseDown If e.Button = MouseButtons.Left Then Me.Opacity = 0.5 SendMessage(Me.Handle.ToInt32, WM_NCLBUTTONDOWN, HTCAPTION, 0&) Me.Opacity = 1.0 End If End Sub
Sample Image:
Sample Application With Code:
Program.zip




Reply With Quote
