我在表单中创建动态标签,并希望光标将其样式从标准样式更改为指针。此时代码看起来像这样:
Set lbl = Me.Controls.Add("Forms.Label.1")
With lbl
.Caption = myArray(i) ' array of label names
.Top = i * 25
'.MouseIcon = "C:\hand.cur" <- this does not work
End With
不幸的是,这不起作用。
答案 0 :(得分:2)
你需要:
...
.MousePointer = fmMousePointerCustom
.MouseIcon = LoadPicture("C:\hand.cur")
End With