在VB中显示动画鼠标图标
2006-02-27 11:53:01 来源:WEB开发网核心提示:Win95的动画鼠标为应用程序增色不少,而VB则只提供一般的鼠标图标支持,在VB中显示动画鼠标图标,要用VB显示动画鼠标形状,你可以使用以下方法:函数声明:PublicConstGCL_HCURSOR=-12DeclareFunctionClipCursorLib"user32"(lPRectAsA
Win95的动画鼠标为应用程序增色不少,而VB则只提供一般的鼠标图标支持。要用VB显示动画鼠标形状,你可以使用以下方法:
函数声明:
PublicConstGCL_HCURSOR=-12
DeclareFunctionClipCursorLib"user32"(lPRectAsAny)AsLong
DeclareFunctionDestroyCursorLib"user32"(ByValhCursorAsAny)AsLong
DeclareFunctionLoadCursorFromFileLib"user32"Alias"LoadCursorFromFileA"(ByVal
lpFileNameAsString)AsLong
DeclareFunctionSetClassLongLib"user32"Alias"SetClassLongA"(ByValhwndAsLong,
ByValnIndexAsLong,ByValdwNewLongAsLong)AsLong
DeclareFunctionGetClassLongLib"user32"Alias"GetClassLongA"(ByValhwndAsLong,
ByValnIndexAsLong)AsLong
使用:
DimmhBaseCursorAsLong,mhAniCursorAsLong
DimlResultAsLong
mhAniCursor=LoadCursorFromFile("c:\windows\cursors\appstart.ani")
lResult=SetClassLong((hwnd),GCL_HCURSOR,mhAniCursor)->
函数声明:
PublicConstGCL_HCURSOR=-12
DeclareFunctionClipCursorLib"user32"(lPRectAsAny)AsLong
DeclareFunctionDestroyCursorLib"user32"(ByValhCursorAsAny)AsLong
DeclareFunctionLoadCursorFromFileLib"user32"Alias"LoadCursorFromFileA"(ByVal
lpFileNameAsString)AsLong
DeclareFunctionSetClassLongLib"user32"Alias"SetClassLongA"(ByValhwndAsLong,
ByValnIndexAsLong,ByValdwNewLongAsLong)AsLong
DeclareFunctionGetClassLongLib"user32"Alias"GetClassLongA"(ByValhwndAsLong,
ByValnIndexAsLong)AsLong
使用:
DimmhBaseCursorAsLong,mhAniCursorAsLong
DimlResultAsLong
mhAniCursor=LoadCursorFromFile("c:\windows\cursors\appstart.ani")
lResult=SetClassLong((hwnd),GCL_HCURSOR,mhAniCursor)->
更多精彩
赞助商链接