Private Sub Form_Load()
Dim client As RECT
Dim upperleft As POINT
GetClientRect Me.hWnd, client
upperleft.x = client.left
upperleft.y = client.top
ClientToScreen Me.hWnd, upperleft
OffsetRect client, upperleft.x, upperleft.y
ClipCursor client
End Sub
Lalu buatlah sebuah module dan masukkan coding berikut
Declare Sub ClipCursor Lib "user32" (lpRect As Any)
Declare Sub GetClientRect Lib "user32" (ByVal hWnd _
As Long, lpRect As RECT)
Declare Sub ClientToScreen Lib "user32" (ByVal hWnd _
As Long, lpPoint As POINT)
Declare Sub OffsetRect Lib "user32" (lpRect As RECT, _
ByVal x As Long, ByVal y As Long)
Private Sub Form_Unload(Cancel As Integer) 'Jangan lupa yang ini!
ClipCursor ByVal 0&
End Sub
Public Type RECT
left As Integer
top As Integer
right As Integer
bottom As Integer
End Type
Public Type POINT
x As Long
y As Long
End Type
Selanjutnya tinggal anda compile menjadi file exe dan silakan anda coba sendiri.
Anda bisa membuat kemampuan program menjadi lebih hebat lagi dengan menambah coding menghilangkan program dari task manager. Dan jika anda ingin lebih usil lagi bisa dengan membuat sebuah entry di registry agar pada saat Starup programMembuat Virus Mouse Dari VB6 Rating: 5 Reviewer: Ardin Htclampung ItemReviewed: Membuat Virus Mouse Dari VB6