会员: 密码:  免费注册 | 忘记密码 | 会员登录 网页功能: 加入收藏 设为首页 网站搜索  
技术文档 > VB文档 > 多媒体
在VB中显示动画鼠标图标
发表日期:2005-06-08 23:55:14作者: 出处:  

Win95 的动画鼠标为应用程序增色不少,而 VB 则只提供一般的鼠标图标支持。要用 VB 显示动画鼠标形状,你可以使用以下方法:


函数声明:

Public Const GCL_HCURSOR = -12

 

Declare Function ClipCursor Lib \"user32\" (lpRect As Any) As Long

Declare Function DestroyCursor Lib \"user32\" (ByVal hCursor As Any) As Long

Declare Function LoadCursorFromFile Lib \"user32\" Alias \"LoadCursorFromFileA\" (ByVal

lpFileName As String) As Long

Declare Function SetClassLong Lib \"user32\" Alias \"SetClassLongA\" (ByVal hwnd As Long,

ByVal nIndex As Long, ByVal dwNewLong As Long) As Long

Declare Function GetClassLong Lib \"user32\" Alias \"GetClassLongA\" (ByVal hwnd As Long,

ByVal nIndex As Long) As Long


使用:
 

Dim mhBaseCursor As Long, mhAniCursor As Long

Dim lResult As Long

mhAniCursor = LoadCursorFromFile(\"c:windowscursorsappstart.ani\")

lResult = SetClassLong((hwnd), GCL_HCURSOR, mhAniCursor)

返回顶部】 【打印本页】 【关闭窗口

关于我们 / 给我留言 / 版权举报 / 意见建议 / 网站编程QQ群   
Copyright ©2003- 2024 Lihuasoft.net webmaster(at)lihuasoft.net 加载时间 0.0043