het solved
Printable View
het solved
anyone know?
100% is easy.
Add any controls you want. For Labels to be transparent set their BackColor to match the one we set the Form to here:
Code:Option Explicit
Private Declare Function GetWindowLong Lib "user32" _
Alias "GetWindowLongA" ( _
ByVal hWnd As Long, _
ByVal nIndex As Long) As Long
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 SetLayeredWindowAttributes Lib "user32" ( _
ByVal hWnd As Long, _
ByVal crKey As Long, _
ByVal bAlpha As Byte, _
ByVal dwFlags As Long) As Long
Private Const GWL_EXSTYLE = (-20)
Private Const WS_EX_LAYERED = &H80000
Private Const LWA_COLORKEY = &H1&
Private Const LWA_ALPHA = &H2&
Private Sub Form_Load()
'Set the Form transparent by color.
BackColor = RGB(127, 127, 0) 'Unique but explicit (non-system) color.
SetWindowLong hWnd, _
GWL_EXSTYLE, _
GetWindowLong(hWnd, GWL_EXSTYLE) Or WS_EX_LAYERED
SetLayeredWindowAttributes hWnd, BackColor, 0, LWA_COLORKEY
End Sub
het solved
Yes I think so, but it won't work on anything less than Win2k. Look up the APIs at MSDN if your unsure.
Yes, Win2K and later.
Thanks ... dilettante ... you are ......Great............
it's not only transparent form , but also .... click- through .
i tried it on XP .. it works great ........
Very Great Job ;)
I got inspired when a guy somewhere else said "only in .Net!" ;)