使用箭头光标作为文本框

发布于 2024-10-01 17:11:11 字数 108 浏览 8 评论 0原文

我在 MS Access 2003 表单中使用文本框代替按钮。当我将鼠标悬停在文本框上时,光标会变为插入点。有什么方法可以使光标保持鼠标状态(并保持文本框可点击 - 因此“启用”属性不能设置为“否”)?

I am using a textbox in lieu of a button in a MS Access 2003 form. When I hover over the textbox, the cursor changes to an insertion point. Is there any way to keep the cursor a mouse (and keep the textbox clickable- so the "enabled" property can't be set to "no")?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

好倦 2024-10-08 17:11:11

在文本框的鼠标移动事件中,设置:

screen.MousePointer = 1

In the mouse move event of the textbox, set:

screen.MousePointer = 1
故人的歌 2024-10-08 17:11:11

这也很有用,您可以将其用作参考并在其基础上构建以满足您的需求。

粘贴到模块中:

Option Compare Database
Option Explicit

' Declarations for setting the cursor icon when called
Public Const IDC_HAND = 32649&
Public Const IDC_ARROW = 32512&
Public Declare Function LoadCursor Lib "user32" Alias "LoadCursorA" (ByVal hInstance As Long, ByVal lpCursorName As Long) As Long
Public Declare Function SetCursor Lib "user32" (ByVal hCursor As Long) As Long

如何调用超链接手(记住使用正确的模块名称):

CursorModule.SetCursor LoadCursor(0, IDC_HAND)

如何调用默认光标形状:

CursorModule.SetCursor LoadCursor(0, IDC_ARROW)

来源:
更改光标形状

This will also be useful, you can use it as reference and build upon it to fit your needs.

Paste into module:

Option Compare Database
Option Explicit

' Declarations for setting the cursor icon when called
Public Const IDC_HAND = 32649&
Public Const IDC_ARROW = 32512&
Public Declare Function LoadCursor Lib "user32" Alias "LoadCursorA" (ByVal hInstance As Long, ByVal lpCursorName As Long) As Long
Public Declare Function SetCursor Lib "user32" (ByVal hCursor As Long) As Long

How to call the hyperlink hand (remember to use the proper module name):

CursorModule.SetCursor LoadCursor(0, IDC_HAND)

How to call the default cursor shape:

CursorModule.SetCursor LoadCursor(0, IDC_ARROW)

Source:
Changing Cursor Shape

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文