
Originally Posted by
dunfiddlin
Got to say it works absolutely fine for me without the extra comand suggested by db so I guess we need to see code to find what other factors may be affecting it.
And i must say it works fine for me too...
I explaine. I didn't told you but i have an instruction to move the borderless form at MouseMove.
Disable this instruction at MouseMove, all works fine with MouseDown and MouseUp Events.
At this point my problem is to move the borderless form with opacity at 50% and make it available at 100% when stop moving the form.
My code in MouseMove Event is this:
Code:
If e.Button = MouseButtons.Left Then
ReleaseCapture()
SendMessage(varForm.Handle.ToInt32, WM_NCLBUTTONDOWN, HTCAPTION, 0&)
End If
You must first declare some stuff:
Code:
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
Declare Sub ReleaseCapture Lib "User32" ()
Const WM_NCLBUTTONDOWN As Integer = &HA1
Const HTCAPTION As Integer = 2
I can move the form with opacity at 50%, but releasing the mouse the form don't turn to 100% of the opacity!
Any Help!? Thank you both for your suggestions!