使用箭头光标作为文本框

时间:2010-11-08 18:01:29

标签: ms-access forms textbox cursor ms-access-2003

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

2 个答案:

答案 0 :(得分:2)

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

screen.MousePointer = 1

答案 1 :(得分:0)

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

粘贴到模块中

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)

来源: Changing Cursor Shape