Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SetPointer or Cursor

351 views
Skip to first unread message

Dave Hauze

unread,
Apr 3, 2009, 12:49:14 PM4/3/09
to
Is there any way to set the pointer (cursor) to a custom cursor file, using SetPointer or some other function (best I can tell, SetPointer only works with the Enumerated Values (another thing Sybase should change, this should support any .CUR file). Anyway, if anyone know's how to change the pointer in script to a custom .CUR or other graphics file, please let me know. Thanks!

--
Dave Hauze

Jerry Siegel [TeamSybase]

unread,
Apr 3, 2009, 1:17:03 PM4/3/09
to
Help says: The available shapes include the stock pointers listed above, as
well as any custom cursor files you have.
Have you tried it with a file name?

BTW, please post in plain text - some newsreaders choke on rich text/HTML

--
Report Bugs: http://case-express.sybase.com/cx/welcome.do
Product Enhancement Requests:
http://my.isug.com/cgi-bin/1/c/submit_enhancement

"Dave Hauze" <david...@steeldynamics.com> wrote in message
news:49d63e0a$1@forums-1-dub...

Chris Pollach

unread,
Apr 3, 2009, 2:24:51 PM4/3/09
to
Hi Dave;

Have a look at my CD Player I built from my STD Foundation classes. It
uses animated cursors. However, I believe Jerry is thinking about the
"pointer" property where you can assign a file (same in the DWO). For the CD
player, I wrote a section of code that trips through the control array and
assigns all the controls a .CUR file. So you could do that when a long
running process is running - then call this routine again to restore the
default arrow cursor after the process has completed.

You can download the example code at the new home of the Foundation
Classes ( http://sourceforge.net/projects/stdfndclass )at ...
http://sourceforge.net/project/showfiles.php?group_id=214437&package_id=310857

HTH

--
Regards ... Chris
ISUG - NA RUG Director
http://chrispollach.pbdjmagazine.com


"Dave Hauze" <david...@steeldynamics.com> wrote in message

news:49d64d14$1@forums-1-dub...
> Actually didn't realize I had it in HTML, hopefully this is better.
>
> Actually, in that section of help I believe it is referring setting up
> cursors in painters only (not in script) for things like the DragIcon in
> datawindows and whatnot. Here's the quote
>
> "In PowerBuilder's painters, you can specify the pointer shape that
> PowerBuilder displays when the user moves the pointer over a window, a
> control, or specific parts of a DataWindow object. The available shapes

> include the stock pointers listed above, as well as any custom cursor
> files you have."
>

> I have tried a filename in SetPointer instead of one of the Enumerated
> Values and it doesnt' work. So, I'm pretty sure the SetPointer option is
> not going to work. What I'm trying to find out if someone has found a
> different way to do what I am trying, to alter the pointer in Script
> without using one of the enumerated values for the SetPointer function...
> (again, I do think Sybase should overload that function and allow users to
> pass a .ICO, .PNG, .JPG, or .CUR file as an alternative to the enumerated
> values.) I'll be suggesting this at ISUG. Obviously I can't use the
> SetPointer function, is there some other function, or Windows API options
> I just have not been able to find?
>
> --
> Dave Hauze
> "Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com> wrote in message
> news:49d6448f$1@forums-1-dub...

Dave Hauze

unread,
Apr 3, 2009, 1:53:24 PM4/3/09
to
Actually didn't realize I had it in HTML, hopefully this is better.

Actually, in that section of help I believe it is referring setting up
cursors in painters only (not in script) for things like the DragIcon in
datawindows and whatnot. Here's the quote

"In PowerBuilder's painters, you can specify the pointer shape that
PowerBuilder displays when the user moves the pointer over a window, a

control, or specific parts of a DataWindow object. The available shapes

include the stock pointers listed above, as well as any custom cursor files
you have."

I have tried a filename in SetPointer instead of one of the Enumerated

Values and it doesnt' work. So, I'm pretty sure the SetPointer option is not
going to work. What I'm trying to find out if someone has found a different
way to do what I am trying, to alter the pointer in Script without using one
of the enumerated values for the SetPointer function... (again, I do think
Sybase should overload that function and allow users to pass a .ICO, .PNG,
.JPG, or .CUR file as an alternative to the enumerated values.) I'll be
suggesting this at ISUG. Obviously I can't use the SetPointer function, is
there some other function, or Windows API options I just have not been able
to find?

--
Dave Hauze
"Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com> wrote in message
news:49d6448f$1@forums-1-dub...

Jerry Siegel [TeamSybase]

unread,
Apr 3, 2009, 3:14:35 PM4/3/09
to
That line of help was copied from the SetPointer topic - near the bottom.
This is not the first time the documentation has had an error!
I agree that the function should support user icon files - let me know the
ISUG enhancement # and I'll vote for it.

"Dave Hauze" <david...@steeldynamics.com> wrote in message

news:49d64d14$1@forums-1-dub...

Dave Hauze

unread,
Apr 9, 2009, 2:23:06 PM4/9/09
to
IT's not been reviewed yet, but it is Enhancement ID (3576)

--
Dave Hauze

"Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com> wrote in message

news:49d6601b$1@forums-1-dub...

Dave Hauze

unread,
Apr 9, 2009, 2:24:57 PM4/9/09
to
Thanks Chris, I'll take a look and see if we can use this... I'll let you
know how it goes...

--
Dave Hauze

"Chris Pollach" <cpol...@travel-net.com> wrote in message
news:49d65473@forums-1-dub...

Dave Hauze

unread,
Apr 9, 2009, 4:01:26 PM4/9/09
to
Well, it appears that this is simply alters the pointer when the mouse is
over certain objects. The object I'm working on is a custom DW, and when I
drag an item, I want to change the cursor (to like a grabbing hand). I know
what you're going to say (What about DragIcon), well we're doing some other
things with the Windows API to grab the "item at pointer" and it attempts to
grab the altered pointer.

However, I did find a way to set the cursor from a file (finally) using the
WindowsAPI.

//Add to Local External Functions
FUNCTION LONG LoadCursorFromFileW(STRING lpFileName) LIBRARY 'user32'
FUNCTION LONG SetCursor(LONG al_HCur) LIBRARY 'user32'

//Add to constructor event of object in question
il_MoveCursor = LoadCursorFromFileW('C:\Windows\Cursors\hmove.cur')

//Add to MouseMove event after conditions for Grab have been met
SetCursor(il_MoveCursor)


--
Dave Hauze
"Chris Pollach" <cpol...@travel-net.com> wrote in message
news:49d65473@forums-1-dub...

Jerry Siegel [TeamSybase]

unread,
Apr 9, 2009, 4:17:38 PM4/9/09
to
I have voted for it and added a comment that .ANI (animated cursor) should
also be included.

"Dave Hauze" <david...@steeldynamics.com> wrote in message

news:49de3d0a@forums-1-dub...

Dave Hauze

unread,
Apr 14, 2009, 11:22:39 AM4/14/09
to
Thanks Jerry, I can't believe it's gotten to V 11.5 without this
capability... I had to use the WinAPI to do it...

--
Dave Hauze
"Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com> wrote in message

news:49de57e2@forums-1-dub...

0 new messages