With the following code you can add a nice looking dropshadow to a form.
You can also specify any hwnd to add a shadow to a control or menu, whatever you like.
GeSHi (vb):
Private Declare Function GetClassLong Lib "user32" Alias "GetClassLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetClassLong Lib "user32" Alias "SetClassLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Const CS_DROPSHADOW = &H20000
Private Const GCL_STYLE = (-26)
Private Sub Form_Load()
DropShadow Me.hwnd
End Sub
Private Sub DropShadow(hwnd As Long)
SetClassLong hwnd, GCL_STYLE, GetClassLong(hwnd, GCL_STYLE) Or CS_DROPSHADOW
End Sub
Created by GeSHI 1.0.7.20
Add this code to a form and hit F5 ! Looks like that :