VB.Net - Form With A Border Shadow

Add this code snippet to your form class, the form will then have a border shadow.
  1. Protected Overrides ReadOnly Property CreateParams() As System.Windows.Forms.CreateParams
  2.  
  3.         Get
  4.                 Const CS_DROPSHADOW = &H20000
  5.                 Dim cParam As CreateParams = MyBase.CreateParams
  6.                 cParam.ClassStyle = cParam.ClassStyle Or CS_DROPSHADOW
  7.                 Return cParam
  8.         End Get
  9.  
  10. End Property

1 comment:

Anonymous said...

Thank you!
This code is perfect, I just like to know if it is possible to change the opacity of the shadow

Post a Comment