When I change pb control's pointer,and select a .cur file ,PB always tell me to specify a valid image,what kind of cursor file can be used with pb pointer?
When I change pb control's pointer,and select a .cur file ,PB always tell me to specify a valid image,what kind of cursor file can be used with pb pointer?
HI APB;
This code works for me in a CB or PB as follows:
In a Post Constructor event ....
THIS.Pointer = "Search.cur" // TEST
Then in CB or PB, the cursor is now a magnifying glass.
What seems to be the issue to me is that the various painter's (ie: Window / Visual UO) do not expose the "Pointer" property.
Regards ... Chris
I test this both in PB2019 R3 , PB 11.5 and PB 2022 R2, In PB 11.5 ,pointer file can be defined ,but 2019 and 2022 cant ,always respone invalid image .
I change the pointer in sourcode , It works.
type cb_1 from commandbutton within w_cursot
integer x = 736
integer y = 420
integer width = 402
integer height = 132
integer taborder = 10
integer textsize = -10
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Tahoma"
string pointer = "E:\test\Pics\Cursor\lperson.cur" --> i can edit this in edit source ,but cant do this in IDE
string text = "none"
end type
Documentation states that a cursor in .cur format can be used.
Can you please be a little more specific as to how and where you are specifying the name of the pointer/cursor file, as there are a variety of places that this can be specified. Also, what version/release/build of PB? Please consider zipping the .cur file and attaching it to a new reply in this thread so that others can attempt to use it.
Also: Please keep in mind that PB was first created several decades ago, so it may not support more recent enhancements to mouse cursors, such as animated cursors. I would not be surprised to learn that only older-style, non-animated cursors can be used.
One final thought: As with any external graphics resource file, you should use a relative path when specifying the .cur file and include it in a .pbr (resource file) when the app is built for deployment.
Best regards, John