CreateCursor
VB声明
Declare Function CreateCursor Lib "user32" Alias "CreateCursor" (ByVal hInstance As Long, ByVal nXhotspot As Long, ByVal nYhotspot As Long, ByVal nWidth As Long, ByVal nHeight As Long, lpANDbitPlane As Any, lpXORbitPlane As Any) As Long
说明
创建一个鼠标指针
返回值
Long,执行成功返回指针的句柄,零表示失败。会设置GetLastError
参数表
参数 类型及说明
hInstance Long,准备拥有指针的应用程序的实例的句柄。可用GetWindowWord函数获得拥有一个窗体或控件的一个实例的句柄
nXhotspot,nYhotspot Long,鼠标指针图象中代表准确指针位置的X,Y坐标
nWidth Long,指针图象的宽度。可用GetSystemMetrics函数判断一个特定设备的正确编号。VGA的编号是32
nHeight Long,指针图象的高度。可用GetSystemMetrics函数判断一个特定设备的正确编号。VGA的编号是32
lpANDbitPlane Any,指向AND位图数据的指针
lpXORbitPlane Any,指向XOR位图数据的指针
注解

一旦不再需要,注意用DestroyCursor函数释放鼠标指针占用的内存及资源

Top