En  Fa
Discovering: Tips & Tricks  > Languages  > C# Tips  > How to add shadows under C# forms in XP
 
 

How to add shadows under C# forms in XP

   

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: 1732
Votes: 4
Rating:   from 5.00 Points

Your Rating:

bookmark this
 

There is no comment for this topic.
Language:

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