Drop Shadow At The Form Border In C#

shadow


i hope you guys didn't forget the same thing that i have written for VB.NET . alright like that we are now going to make the form border drop shadow that will make the form look awesome :) if your on a project that doesn't matter or create a new project to test it .

under

    public partial class Form1 : Form
    {


add these codes

 protected override CreateParams CreateParams
        {
            get
            {
                CreateParams cp = base.CreateParams;
                cp.ClassStyle |= CS_DROPSHADOW;
                return cp;
            }
        }

now debug and enjoy the shadow

c# shadow at form

share ! comment ! like us on facebook ! follow us on twitter !

VB.NET Drop Shadow At The Form Border

this is something make your application attractive by the way this is a simple code that you have to place under public class form1

vb.net drop shadow

so here is the code

Protected Overrides ReadOnly Property CreateParams() As System.Windows.Forms.CreateParams
        Get
            Const DROPSHADOW = &H20000
            Dim cParam As CreateParams = MyBase.CreateParams
            cParam.ClassStyle = cParam.ClassStyle Or DROPSHADOW
            Return cParam
        End Get
    End Property

and the shadow

vb.net drop shadow preview