WinForm Opacity - BeginDrag / EndDrag
-
Hi all, I am trying to change the opacity of the Form while dragging it around. Basically it must set the opacity value to 0.5 when the drag begin and when it stop it must set it back to 1.0. The thing is I have overridden alot of method trying to accomplish this, without success?:confused: Can anyone please help? Many thanks in advance Kind regards,
The only programmers that are better C# programmers, are those who look like this -> :bob:
:java: Programm3r My Blog: ^_^
-
Hi all, I am trying to change the opacity of the Form while dragging it around. Basically it must set the opacity value to 0.5 when the drag begin and when it stop it must set it back to 1.0. The thing is I have overridden alot of method trying to accomplish this, without success?:confused: Can anyone please help? Many thanks in advance Kind regards,
The only programmers that are better C# programmers, are those who look like this -> :bob:
:java: Programm3r My Blog: ^_^
Something like this works:
private const int WM_ENTERSIZEMOVE = 0x0231; private const int WM_EXITSIZEMOVE = 0x0232; protected override void WndProc(ref Message m) { base.WndProc(ref m); switch (m.Msg) { case WM_ENTERSIZEMOVE: this.Opacity = 0.5; break; case WM_EXITSIZEMOVE: this.Opacity = 1.0; break; } this.Invalidate(); }
Still trying to get rid of the small flicker....The only programmers that are better C# programmers, are those who look like this -> :bob:
:java: Programm3r My Blog: ^_^