Advertisement
ASP_Volume3 Windows CE #51953

Windows Drawn Drop Shadow

Ever wonder how Windows XP draws the drop shadow on menus and tooltips? Now you can draw the drop shadow on forms. Perfect for splash screens. For Windows XP (and Server 2003?) only. Visual Basic .NET. Copy this to your form code. Update: Thanks to the annonimus coder, now C# ready!

AI

AI Summary: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Source Code
original-source
' VB.NET
Protected Overrides ReadOnly Property CreateParams() As System.Windows.Forms.CreateParams
 Get
  Const CS_DROPSHADOW = &H20000
  Dim cp As CreateParams = MyBase.CreateParams
  cp.ClassStyle = cp.ClassStyle Or CS_DROPSHADOW
  Return cp
 End Get
End Property
//C#
/// 
<summary>
/// This property adds drop shadows to the for(in WinXP+) 
/// 
</summary>
protected override System.Windows.Forms.CreateParams CreateParams
{
 get
 {
  const int CS_DROPSHADOW = 0x20000;
CreateParams cp = base.CreateParams;
 cp.ClassStyle = cp.ClassStyle | CS_DROPSHADOW;
  return cp;
 }
}
Upload
Original Comments (3)
Recovered from Wayback Machine