Custom mouse icon?

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 09 September 2009   #1
Custom mouse icon?

Is there a way to setup custom mouse icons?
__________________
Paul Neale
http://paulneale.com
 
Old 09 September 2009   #2
Yes, I have been able to do that with the .NET Framework.

From MSDN:
Quote: The mouse pointer is represented by the Cursor class, and each Control has a System.Windows.Forms.Control.Cursor property that specifies the pointer for that control. The Cursor class contains properties that describe the pointer, such as the Position and HotSpot properties, and methods that can modify the appearance of the pointer, such as the Show, Hide, and DrawStretched methods.


In the Cursor class, there is a static Current property that represents the current used cursor. You can create a custom mouse cursor by using the constructor Cursor(String) or Cursor(Stream).
__________________
 
Old 09 September 2009   #3
Originally Posted by PEN: Is there a way to setup custom mouse icons?



c = dotnetclass "System.Windows.Forms.Cursor"
c.Current = dotnetobject "System.Windows.Forms.Cursor" "myCursor.ico"


but where and how do you want to show it? you can show this cursor just over dotnet controls
 
Old 09 September 2009   #4
So it won't work on viewports and standard interface, right? Any solution for that? (SDK apart)

- Enrico
__________________
IllusionCatalyst – Instrument set for 3ds Max │ AliquaForma – Personal portfolio in fieri
 
Old 09 September 2009   #5
I'm looking to have it just over the tool that I'm developing. I'll have a look at what you have there. Will it only use ico files?
__________________
Paul Neale
http://paulneale.com
 
Old 09 September 2009   #6
Hum from what I remember using .net will change the cursor on any "surface", but as soon as you move the mouse it returns to the "correct" cursor (maybe this only happens if the main thread is not busy however? not sure). On most .net controls you can set the cursor property to whatever cursor you want, which will remain even if you move the mouse, but of course only over that control.

As for the cursors themselves you can use "System.Windows.Forms.Cursors" along with "System.Windows.Forms.Cursor" (notice the S at the end, they are two different classes) to set the current cursor to one of the standard windows cursors. For instance:


cursors = dotNetClass "System.Windows.Forms.Cursors"
cursor = dotNetClass "System.Windows.Forms.Cursor"
cursor.current = cursors.WaitCursor


will set the cursor to the hourglass in XP and to the twirly circle in Vista.
__________________
MatManager - take control of your materials
Teacup - online material sharing inside 3D Studio
 
Old 09 September 2009   #7
Maybe this example, can be implemented in max?
http://www.ii.uni.wroc.pl/~wzychla/cs_enFAQ.html
-Johan
__________________
Online: LinkedIn
 
Old 09 September 2009   #8
Thanks guys, I will be trying this in the next few days and I will post what I get working.

JHN, I think that can be adapted.
__________________
Paul Neale
http://paulneale.com
 
Old 09 September 2009   #9
Hi Paul

try this

cursors = dotNetClass "System.Windows.Forms.Cursors"

hand_move = dotNetObject "System.Windows.Forms.Cursor" "C:\WINDOWS\Cursors\hmove.cur"

cursors.Hand.Current = hand_move
 
Old 09 September 2009   #10
Thanks.

Here is a just a piece of the insanity that I have been working on.

__________________
Paul Neale
http://paulneale.com
 
Old 09 September 2009   #11
Whoa. Custom tool for a client or public?
MaxScript only?
 
Old 09 September 2009   #12


Are you trying to use every control type available? =P
__________________
MatManager - take control of your materials
Teacup - online material sharing inside 3D Studio
 
Old 09 September 2009   #13
Ya I have a goal, I want to use every Max script command possible in one tool

Yes this is all Max script. The full tool has, so far, five scripted geometry plugins and this main UI. The UI is now using a createDialog with a main rollout and two sub rollouts that you see on the right side. Those sub rollouts display the rollouts from the scripted geometry objects when they are selected in the treeView. For the left side I have a dotNet flowLayOut as the main panel then I'm loading in tool strips, a label, tabControl and then a splitContainer with treeView and ListView. The tree and list are synced up so they act as one. Part of the syncing is happening via data that is stored in a struct and then converted to a dotNetMxsValue and placed in the tag property of each of the treeNodes and listItems.

Sorry, this will not be for the public but I figure I should share the ideas of how I'm building it.
__________________
Paul Neale
http://paulneale.com
 
Old 09 September 2009   #14
That's looks pretty intense! It's a tool for blending animation clips I presume!?
It's a lot of work to build all that to have a mousecursor change it's picture

-Johan
__________________
Online: LinkedIn
 
Old 09 September 2009   #15
That is the tool, It allows for non-linear animation of mouse cursors. Then I just capture the mouse cursor to an MOV on the fly. Fastest way to create a TV series ever.

__________________
Paul Neale
http://paulneale.com
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 12:58 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.