VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Add drop shadows to forms (XP only)

by vcv (16 Submissions)
Category: Graphics
Compatability: Visual Basic 3.0
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (8 Votes)

Adds a drop shadow to any hWnd you specify, just like you see in OfficeXP menus.

Inputs
hWnd: handle of the window to add drop shadow to.
Assumes
Only works on Windows XP.
API Declarations
Public Declare Function GetClassLong Lib "user32" Alias "GetClassLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
Public Declare Function SetClassLong Lib "user32" Alias "SetClassLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Public Const CS_DROPSHADOW = &H20000
Public Const GCL_STYLE = (-26)

Rate Add drop shadows to forms (XP only)

Sub DropShadow(hwnd As Long)
  SetClassLong hwnd, GCL_STYLE, GetClassLong(hwnd, GCL_STYLE) Or CS_DROPSHADOW
End Sub

Download this snippet    Add to My Saved Code

Add drop shadows to forms (XP only) Comments

No comments have been posted about Add drop shadows to forms (XP only). Why not be the first to post a comment about Add drop shadows to forms (XP only).

Post your comment

Subject:
Message:
0/1000 characters