----- Original Message -----
Sent: Friday, February 03, 2006 10:34
AM
Subject: Spam Re: [Programmer-VB]
From Transparan
ehm... transparan form :)
bisa sih, tapi ini hanya bisa jalan di win2K/XP
best regards
[wwn]
'---------------------------------------
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 Declare Function UpdateLayeredWindow
Lib "user32" (ByVal hwnd As Long, ByVal hdcDst As Long, pptDst As Any,
psize As Any, ByVal hdcSrc As Long, pptSrc As Any, crKey As Long, ByVal
pblend As Long, ByVal dwFlags As Long) As Long
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 Const GWL_EXSTYLE = (-20)
Private Const LWA_COLORKEY =
&H1
Private Const LWA_ALPHA = &H2
Private Const ULW_COLORKEY
= &H1
Private Const ULW_ALPHA = &H2
Private Const ULW_OPAQUE
= &H4
Private Const WS_EX_LAYERED = &H80000
Public Function MakeTransparent(ByVal hwnd As Long, ByVal Perc As
Integer) As Long
Dim Msg As Long
On Error
Resume Next
Perc = ((100 - Perc) /
100) * 255
If Perc < 0 Or Perc > 255 Then
MakeTransparent = 1
Else
Msg = GetWindowLong(hwnd,
GWL_EXSTYLE)
Msg = Msg Or
WS_EX_LAYERED
SetWindowLong hwnd, GWL_EXSTYLE,
Msg
SetLayeredWindowAttributes hwnd, 0, Perc,
LWA_ALPHA
MakeTransparent = 0
End If
If Err Then
MakeTransparent = 2
End If
End Function
Public Function IsTransparent(ByVal hwnd As Long) As
Boolean
On Error Resume Next
Dim Msg As
Long
Msg = GetWindowLong(hwnd,
GWL_EXSTYLE)
If (Msg And WS_EX_LAYERED) = WS_EX_LAYERED
Then
IsTransparent = True
Else
IsTransparent = False
End
If
If Err Then
IsTransparent =
False
End If
End Function
On 2/3/06, skdmdn <[EMAIL PROTECTED]> wrote:
Teman2 VB,
Ada yg punya script buat form transparan
gak?
Please dibagi ya....
Thank's
B4