Jun 08
When you create a Form with a border, Windows automatically draws a drop shadow around the form, as shown here:

However, if you set the form’s FormBorderStyle property to None, Windows draws neither the form border nor the drop shadow, as shown here:

So what if you don’t want a form border, but you do want a drop shadow?

The solution is easy. Just add the following code to your Form class:
private const int CS_DROPSHADOW = 0x20000; protected override CreateParams CreateParams { get { CreateParams cp = base.CreateParams; cp.ClassStyle |= CS_DROPSHADOW; return cp; } }
Popularity: 3% [?]
Related posts:


muchas gracias! i've been looking for this
Question: Do you know how to copy using c# a .lnk files. I have a code that copies files within directory but it does not want to copy the .lnk files.
Ideas?
Great!!! This is what I was looking for and never thought it would this easy!!!!
Now that I know how to enable the shadow, do you know, if I can change the thickness of the shadow..