请高手指点,并给一个例子。感激不尽。

解决方案 »

  1.   

    第一种方式:
    Screen.MousePointer = 99
    Screen.MouseIcon = Me.Icon
    第二种方式,利用 API 实现,这种方式可以实现动画光标。
    Option ExplicitPrivate Declare Function GetClassLong Lib "user32" Alias "GetClassLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
    Private Declare Function SetClassLong Lib "user32" Alias "SetClassLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
    Private Const GCL_HCURSOR = (-12)Dim hOldCursor As Long' 设置光标形状
    Private Sub Command1_Click()
        SetClassLong Me.hwnd, GCL_HCURSOR, Me.Icon
    End Sub' 恢得光标形状
    Private Sub Command2_Click()
        SetClassLong Me.hwnd, GCL_HCURSOR, hOldCursor
    End SubPrivate Sub Form_Load()
        hOldCursor = GetClassLong(Me.hwnd, GCL_HCURSOR)
    End Sub
      

  2.   

    把两个 me.icon 都改为 loadpicture("c:\youricon.ico")
      

  3.   

    //把两个 me.icon 都改为 loadpicture("c:\youricon.ico")调入CUR或ANI文件,最好也用API:LoadCursorFromFilePublic Declare Function LoadCursorFromFile Lib "user32" Alias "LoadCursorFromFileA" (ByVal lpFileName As String) As Long