19 Januari 2009

Mouse pointer/kursor elips/bulat

membuat muose pointer menjadi bulat/elips.

Copy Paste kode berikut ke jendela kode form.

'+++++++++++ Awal Kode +++++++++++++
'Membuat pointer mouse bulat

Private Type POINTAPI
x As Long
y As Long
End Type

Private Declare Function GetWindowDC Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function Ellipse Lib "gdi32" (ByVal hdc As Long, ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long

Sub Timer1_Timer()
Dim Position As POINTAPI
GetCursorPos Position
Ellipse GetWindowDC(0), Position.x - 30, Position.y - 30, Position.x + 30, Position.y + 30
End Sub

'++++++++++ Akhir kode +++++++++++++++

Good Luck

Tidak ada komentar:

Posting Komentar

Tinggalkan pesan anda disini.