[此贴子已经被作者于2007-8-29 12:10:56编辑过]
Private Declare Function LoadCursorFromFile Lib "user32" Alias "LoadCursorFromFileA" (ByVal lpFileName As String) As Long
Private Declare Function DestroyCursor Lib "user32" (ByVal hCursor 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)
基本看懂了
先Load(filename) as long得到载入后的图标的句柄
然后用SetClassLong(hWnd,GCL_HCURSOR,那个句柄here)放进Picturebox之类的
最后不用的时候DestroyCursor
SetClassLong的解释可能不够准确
顺便提一句,destory的过去式和过去分词都是destroyed,不是destroied.
Private Declare Function LoadCursorFromFile Lib "user32" Alias "LoadCursorFromFileA" (ByVal lpFileName As String) As Long
Private Declare Function DestroyCursor Lib "user32" (ByVal hCursor 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)
基本看懂了
先Load(filename) as long得到载入后的图标的句柄
然后用SetClassLong(hWnd,GCL_HCURSOR,那个句柄here)放进Picturebox之类的
最后不用的时候DestroyCursor
SetClassLong的解释可能不够准确
顺便提一句,destory的过去式和过去分词都是destroyed,不是destroied.
可是如何放进imagebox并让它显示出来呢?使用loadpicture吗?