Какой API функой можно сделать форму прозрачной?
Заранее спасибо!
Const LWA_COLORKEY = &H1
Const LWA_ALPHA = &H2
Const GWL_EXSTYLE = (-20)
Const WS_EX_LAYERED = &H80000
Declare Function SetLayeredWindowAttributes Lib "user32" (ByVal hWnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long
Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) As Long
Sub SetTransForm(ByVal hWnd As Long, ByVal TRANS As Long)
SetWindowLong hWnd, GWL_EXSTYLE, GetWindowLong(hWnd, GWL_EXSTYLE) Or WS_EX_LAYERED
SetLayeredWindowAttributes hWnd, 0, TRANS, LWA_ALPHA
End Sub
X-BOND писал(а):TRANS - число от 10 до 255 (степень прозрачности, 10-максимальная прозрачность)
Данный код работает в XP
Сейчас этот форум просматривают: AhrefsBot, Yandex-бот и гости: 62