• Ea eam labores imperdiet, apeirian democritum ei nam, doming neglegentur ad vis. Ne malorum ceteros feugait quo, ius ea liber offendit placerat, est habemus aliquyam legendos id.
  • Ea eam labores imperdiet, apeirian democritum ei nam, doming neglegentur ad vis. Ne malorum ceteros feugait quo, ius ea liber offendit placerat, est habemus aliquyam legendos id.
  • Ea eam labores imperdiet, apeirian democritum ei nam, doming neglegentur ad vis. Ne malorum ceteros feugait quo, ius ea liber offendit placerat, est habemus aliquyam legendos id.

Membuat Form Transparan Di VB 6

Minggu, 01 Agustus 2010

Seringkali kita ingin mempercantik tampilan program yang kita buat..rasanya begitu bagus jika form yang kita buat bisa menjadi transparan sekarang kita akan bahas bagaimana Membuat Form Taransparan Di VB 6



1. Buka Visual Basic 6
2. Buat Project Baru
3. Paste Code Berikut

Option Explicit
Private Declare Function SetLayeredWindowAttributes Lib "user32" _
(ByVal hWnd As Long, ByVal crey As Byte, ByVal bAlpha As Byte, _
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

Sub MakeBeGoTransForm(LhWnd As Long, ByVal bLevel As Byte)
On Error GoTo salah
Dim lOldStyle As Long

If (LhWnd <> 0) Then
lOldStyle = GetWindowLong(LhWnd, (-20))
SetWindowLong LhWnd, (-20), lOldStyle Or &H80000
SetLayeredWindowAttributes LhWnd, 0, bLevel, &H2&
End If
salah:
End Sub

Private Sub Form_Load()
' <--- [+] [-] --->
' Min Max
' |--------------|---------------|
' 0 128 255

MakeBeGoTransForm Me.hWnd, 175
End Sub

0 komentar:

Posting Komentar

 
Tempat Belajar © 2010 | Rizki Noor Laksana