Advertisement
4_2005-2006 Windows CE #157250

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 Samenvatting: 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.

Broncode
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
Originele reacties (3)
Hersteld van de Wayback Machine