Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. WinForm Opacity - BeginDrag / EndDrag

WinForm Opacity - BeginDrag / EndDrag

Scheduled Pinned Locked Moved C#
csharpjavacomtoolshelp
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Programm3r
    wrote on last edited by
    #1

    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: ^_^

    P 1 Reply Last reply
    0
    • P Programm3r

      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: ^_^

      P Offline
      P Offline
      Programm3r
      wrote on last edited by
      #2

      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: ^_^

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups