Adapun cara untuk membuat transparent form ini mudah untuk dicoba sendiri dirumah. Langkah awalnya adalah membuat sebuah project baru.
Setelah itu tambahkan kode berikut ini kedalam form tersebut :
Selesai deh tinggal dicoba hasilnya,semakin transparant maka nilai yang diberikan harus semakin kecil../.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
Const WS_EX_LAYERED = &H80000
Const GWL_EXSTYLE = (-20)
Const LWA_ALPHA = &H2
Private Sub form_load()
Dim rtn As Long
rtn = GetWindowLong(hwnd, GWL_EXSTYLE)
rtn = rtn Or WS_EX_LAYERED
SetWindowLong hwnd, GWL_EXSTYLE, rtn
SetLayeredWindowAttributes hwnd, 0, 200, LWA_ALPHA ’200 adalah nilai transparant semakin kecil nilainya semakin transparant, nilai 255 untuk reset.
End Sub
BIAR MUDAH DI COPY DIBAWAH ADA TEKAN Ctrl+C
{ 0 comments... read them below or add one }
Posting Komentar