How can i make a label semi transparent in VB6?
making a label Semi Transparent in VB6
Collapse
X
-
Bytes.com isn't a code or homework service, we're a community of like minded people who come together to help those who are willing to help themselves.
Show us what you've tried and we will do everything we can to nudge you in the right direction but we will not just do the work for you. -
i have tried alot
am trying to have a label with semi transparent background on top of a picture box ,but the Label control in VB6.0 has only two options for the Label's back Style either Transparent(ful l transparent) or Opaque(fully solid) ,and neither one can server me wellComment
-
There is no use of making label semi transparent. You can use a form for semi transparent. Try with below declarations.
Code:Private Declare Function SetLayeredWindowAttributes Lib "user32.dll" (ByVal hwnd As Long, ByVal _ crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Boolean Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, _ ByVal nIndex As Long, ByVal dwNewLong As Long) As Long Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, _ ByVal nIndex As Long) As Long Const LWA_ALPHA = 2 Const GWL_EXSTYLE = (-20) Const WS_EX_LAYERED = &H80000
Comment
Comment