Cara pembuatannya berikut ini :
1. Buka aplikasi Visual Basic 6.0 lewat [Start] > [All Programs] > [Microsoft Visual Studio 6.0] > [Microsoft Visual Studio 6.0].
2. Pada jendela New Project, pilih tab New.
3. Pada tab New, pilihlah Standard EXE dan klik [ Open ] untuk membuka Jendela Project1 - Form1 (Form).
CODE:
- untuk membuka jendela Project1 – Form1 (Code)
- 5. Ketikkan kode program berikut ini :
- [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 Long, ByVal _
- dwFlags As Long) As Long
- Private Const WS_EX_LAYERED As Long = &H80000
- Private Const LWA_ALPHA As Long = &H2
- Private Const GWL_EXSTYLE = (-20)
- Sub TembusPandang(lhWnd As Long, level As Integer)
- On Error GoTo keluar
- Call SetWindowLong(lhWnd, GWL_EXSTYLE, GetWindowLong(lhWnd _
- , GWL_EXSTYLE) Or WS_EX_LAYERED)
- Call SetLayeredWindowAttributes(lhWnd, 0, (level * 255) / 100, LWA_ALPHA)
- keluar:
- End Sub
- Private Sub Form_Load()
- TembusPandang Me.hWnd, 50
- End Sub
6. Untuk melihat hasilnya simpan dan jalankan dengan menekan [F5].
0 komentar:
Posting Komentar
Catatan: Hanya anggota dari blog ini yang dapat mengirim komentar.