samfxpowermanager.blogspot.com
Cara membuat form transparan dengan scroll di vb 6.0
Capek yach membuat launcher dengan Visual Basic 6.0 dari pada pakai Autoplay Media Studio
Jika di-compile error "Not valid win32" katanya, kalau VB 6.0 tidak, banyak rahasianya :)
OK let's go men kita buka VB 6.0-nya seperti biasa, pilihlah selalu Standart EXE
The Materials Needed :) / Silahkan anda terjemahkan dengan Google Translete :
Siapkan Kopi susu hangat :)
Yang diatas hanya basa basi saja gan, hehehe kalau ingin yach gak apa apa :)
Bahan asli yang kita butuhkan :
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 color As Long, ByVal x As Byte, ByVal alpha As Long) As Boolean
Const LWA_BOTH = 3
Const LWA_ALPHA = 2
Const LWA_COLORKEY = 1
Const GWL_EXSTYLE = -20
Const WS_EX_LAYERED = &H80000
Dim iTransparant As Integer
Sub MakeTransparan(hWndBro As Long, iTransp As Integer)
On Error Resume Next
Dim ret As Long
ret = GetWindowLong(hWndBro, GWL_EXSTYLE)
SetWindowLong hWndBro, GWL_EXSTYLE, ret Or WS_EX_LAYERED
SetLayeredWindowAttributes hWndBro, RGB(255, 255, 0), iTransp, LWA_ALPHA
Exit Sub
End Sub
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 color As Long, ByVal x As Byte, ByVal alpha As Long) As Boolean
Const LWA_BOTH = 3
Const LWA_ALPHA = 2
Const LWA_COLORKEY = 1
Const GWL_EXSTYLE = -20
Const WS_EX_LAYERED = &H80000
Dim iTransparant As Integer
Sub MakeTransparan(hWndBro As Long, iTransp As Integer)
On Error Resume Next
Dim ret As Long
ret = GetWindowLong(hWndBro, GWL_EXSTYLE)
SetWindowLong hWndBro, GWL_EXSTYLE, ret Or WS_EX_LAYERED
SetLayeredWindowAttributes hWndBro, RGB(255, 255, 0), iTransp, LWA_ALPHA
Exit Sub
End Sub
Code module, pertama buat module dan masukkan code diatas
![]() |
| Pili salah satu gan, yang Hor atau yang Ver? |
![]() |
| Code Hornya gan, kalau ingin pakai yang Ver yach tinggal ganti saja text "HScroll1" menjadi "VScroll2" |
Sudahlah project kita, mari lihat hasilnya :
![]() | |
| Transparankan? |
Selesai kita tiggal minum kopi susunya nih hehehe, hangatnya nih minuman, agar lebih mantab tambahin saja jahe :)
saya lupa ini setting yang harus dipakai pada Hor atau Vernya :
![]() |
| Pada kolom Name ganti saja boleh :) |
Sekian terima kasih telah berkunjung :)




