Back | View original version

How to add shadows under C# forms in XP

Description

This point shows the way of applying shadows to forms in C#. This method works only for Win2000 or later (2K,XP,2003,Vista,...)

C# code

Add this code to your form class.

protected override CreateParams CreateParams
{
    get
    {
        const int CS_DROPSHADOW = 0x20000;
        CreateParams param = base.CreateParams;
        param.ClassStyle += CS_DROPSHADOW;
        return param;
    }
}

  Details
 
Writer: Salar Khalilzadeh
Date Sent: 6/14/2008 7:45 AM
Views: 1807
Votes: 4
Rating:   from 5.00 Points

Copyright © 2009 SoftProjects.org | About | Valid XHTML | CSS