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; } }
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..
Very nice – easy solution. Curious about controlling the other aspects of the shadow as well (like thickness.)
Shadow is too small. Is there any way to make it larger as in the standart form?
Is there anyway to let the user set the shadow at runtime?
this is help full for me thanks for this 🙂
Hello .. ,
I want to add drop shadow in full square in form border.
Can share any one …
(*_*)