Jumat, 12 Agustus 2011

Membuat Kursor Tangan pada Tombol VB 6.0

Berikut adalah contoh kode untuk membuat kursor tangan pada tombol.
'------------------------------------------
'Start hand cursor variable declaration
Public Declare Function LoadCursor Lib "user32.dll" Alias "LoadCursorA" (ByVal hInstance As Long, ByVal lpCursorName As Long) As Long
Public Declare Function SetCursor Lib "user32.dll" (ByVal hCursor As Long) As Long
Public Const IDC_HandCur As Long = 32649
Public Type CursorTangan
Cursor As Long
End Type
Public HandCur As CursorTangan
'End hand cursor variable declaration
'------------------------------------------

Private Sub cmdBrowse_Click()
    periode_supervisi = "untuk_laporan"
    laporan_per_periode.Enabled = False
    Load browse_periode
    browse_periode.Show
End Sub

Private Sub cmdBrowse_MouseMove(Button As Integer, Shift As Integer, x As Single, Y As Single)
    SetCursor HandCur.Cursor
End Sub
Private Sub cmdBrowse_MouseDown(Button As Integer, Shift As Integer, x As Single, Y As Single)
    SetCursor HandCur.Cursor
End Sub

0 komentar:

Posting Komentar

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Justin Bieber, Gold Price in India