1

I am trying to achieve a shadow on a form with C# winforms 4.0. I did some searching on this and found the following answer :

private const int CS_DROPSHADOW = 0x00020000; 
protected override CreateParams CreateParams 
{ 
    get 
    { 
        // add the drop shadow flag for automatically drawing 
        // a drop shadow around the form 
        CreateParams cp = base.CreateParams; 
        cp.ClassStyle |= CS_DROPSHADOW; 
        return cp; 
    } 
}

However, using the above code, I can not see any shadow. I opened a new clean winforms project in VS2010 and still cannot see a thing. Need some guidance on what could be going wrong here.

Thanks.

Irshad
  • 222
  • 4
  • 17
Shoham Ben-Har
  • 317
  • 1
  • 4
  • 16

0 Answers0