设为首页收藏本站Access中国

Office中国论坛/Access中国论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

返回列表 发新帖
查看: 702|回复: 5
打印 上一主题 下一主题

请问,如何使鼠标在移动到控件上时,变成手形?

[复制链接]
跳转到指定楼层
1#
发表于 2002-10-14 16:15:00 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
请问,如何使鼠标在移动到控件上时,变成手形?
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享分享 分享淘帖 订阅订阅
2#
发表于 2002-10-15 21:00:00 | 只看该作者
看看MousePointer 属性吧,也许有些帮助,但其中没有手形的选择。怎么样增加?让高手出面吧[em27]
3#
发表于 2002-10-16 02:15:00 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
4#
发表于 2002-10-16 20:49:00 | 只看该作者
还是不明白,dyjzbs懂了吗?

点击这里给我发消息

5#
发表于 2002-10-16 21:50:00 | 只看该作者
harsonliao的意思是说用超级链接,浪上飞郑所说要用API调用WINDOWS里的形状,但WIN98和WIN2000里的各不相同,XP不知又是什么样的,可能很麻烦。
6#
发表于 2002-10-17 07:33:00 | 只看该作者
程序: 点击浏览程序

'Change The Mouse Pointer (taken from the AccWebFAQ MDB
'Copyright from Douglas J. Taylor
Private Const IDC_APPSTARTING = 32650&
Private Const IDC_ARROW = 32512&
Private Const IDC_CROSS = 32515&
Private Const IDC_IBEAM = 32513&
Private Const IDC_ICON = 32641&
Private Const IDC_NO = 32648&
Private Const IDC_SIZE = 32640&
Private Const IDC_SIZEALL = 32646&
Private Const IDC_SIZENESW = 32643&
Private Const IDC_SIZENS = 32645&
Private Const IDC_SIZENWSE = 32642&
Private Const IDC_SIZEWE = 32644&
Private Const IDC_UPARROW = 32516&
Private Const IDC_WAIT = 32514&

Private Declare Function apiLoadCursorBynum Lib "user32" _
  Alias "LoadCursorA" _
  (ByVal hInstance As Long, _
  ByVal lpCursorName As Long) _
  As Long

Private Declare Function apiLoadCursorFromFile Lib "user32" _
  Alias "LoadCursorFromFileA" _
  (ByVal lpFileName As String) _
  As Long

Private Declare Function apiSetCursor Lib "user32" _
  Alias "SetCursor" _
  (ByVal hCursor As Long) _
  As Long

Public Function InsideCircle(img As Image, X As Single, Y As Single) As Boolean
  'assume you are outside the circle
  InsideCircle = False
  If (X - (img.Width / 2)) ^ 2 + (Y - (img.Height / 2)) ^ 2 <= (img.Height / 2) ^ 2 Then
    'Inside the circle
    InsideCircle = True
  End If
End Function
Public Sub ChangeCursor()
'based on the AccWebFAQ by Douglas Taylor
Dim strDBPath As String
Dim lngRet As Long
Const curNAME = "Cursor1.CUR"
  
  strDBPath = CurrentDb.Name
  strDBPath = Left(strDBPath, InStr(strDBPath, Dir(strDBPath)) - 1)
  If Len(Dir(strDBPath & curNAME)) > 0 Then
    lngRet = apiLoadCursorFromFile(strDBPath & curNAME)
    lngRet = apiSetCursor(lngRet)
    'PointM (strDBPath & curNAME)
  End If
End Sub



[此贴子已经被作者于2002-10-16 23:32:30编辑过]

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|站长邮箱|小黑屋|手机版|Office中国/Access中国 ( 粤ICP备10043721号-1 )  

GMT+8, 2024-9-27 06:16 , Processed in 0.209177 second(s), 30 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表