REAL Software Forums

The forum for REAL Studio and other REAL Software products.
[ REAL Software Website | Board Index ]
It is currently Sun Aug 01, 2010 12:09 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Custom Cursor (CURS)
PostPosted: Thu Nov 13, 2008 8:23 am 
Offline

Joined: Fri Dec 01, 2006 9:39 pm
Posts: 103
I'm creating a custom cursor with 'Resorcerer' or 'Rezilla' (it doesn't matter) and drop it into my project.

But when i use
Code:
Me.MouseCursor = myCursor

the cursor show up only if I set the "HotSpot" of the Cursor to the very top/left


This works:
Image

And this not:
Image

In the project window the cursor icon is always ok.

That makes no sense to me.
Any ideas?


Using RB 2008r4.1


Top
 Profile  
 
 Post subject: Re: Custom Cursor (CURS)
PostPosted: Thu Nov 13, 2008 10:20 am 
Offline

Joined: Mon Aug 20, 2007 9:42 am
Posts: 180
I had this exact problem when I was using 2005 r1 (I think).

The way I got around it was to create some cursor files on my Windows box (.cur files IIRC) and imported them. They work just as well.


Top
 Profile  
 
 Post subject: Re: Custom Cursor (CURS)
PostPosted: Thu Nov 13, 2008 12:37 pm 
Offline

Joined: Fri Dec 01, 2006 9:39 pm
Posts: 103
if I use the resource for color cursers "crsr" everything works fine.
But still problems with "CURS"

I have to maintain some older projects with tons of cursers.
Anybody knows what to do?


Top
 Profile  
 
 Post subject: Re: Custom Cursor (CURS)
PostPosted: Fri Nov 14, 2008 2:29 pm 
Offline

Joined: Fri Dec 01, 2006 9:39 pm
Posts: 103
This is what I found out:
The "HotSpot" is in the last 4 bytes of the resource cursor. If you swap this two byte pairs the cursor will work in REALBasic.

I wrote a little app, that extract "CURS" cursors from a resource file and convert it to REALBasic xml-cursors.
The xml files will have a icon that represent the cursor.

Here is the application including the source code:

exCURS

new in version 1.1:
exCURS except now files with "CURS" resources in the DataFork


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group