Jumat, 29 Januari 2010

Source Code Membuat Invert Warna Form di VB 6

Untuk menginvert warna form di VB 6, diperlukan 1 buah form dan 1 buah Module.


Copy Paste code di bawah ini di Module:

Public Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type


Public Declare Function GetWindowDC Lib "user32" (ByVal hwnd As Long) As Long
Public Declare Function GetActiveWindow Lib "user32" () As Long
Public Declare Function InvertRect Lib "user32" (ByVal hdc As Long, lpRect As RECT) As Long

 Kemudian Copy Paste Code ini di form:

Private Sub Command1_Click()
Dim dHwnd As Long
Dim dDc As Long
Dim rc As RECT

rc.Left = 0
rc.Top = 0
rc.Right = 1500
rc.Bottom = 1500

dHwnd = GetActiveWindow
dDc = GetWindowDC(dHwnd)
sakde = InvertRect(dDc, rc)

End Sub

Private Sub Command2_Click()
Me.Hide
End Sub


0 comments:

Posting Komentar

Twitter Delicious Facebook Digg Stumbleupon Favorites More

Enter your email address to subscribe:

Delivered by FeedBurner

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | SharePoint Demo