Tuesday, September 01, 2009 7:24 AM
How to change mouse pointer scheme in C#?
(Mouse Pointer scheme can be found in ControlPanel->Mouse->Pointers tab->Scheme)
Is there any api Available?
Please give some samples?
ALso is there any way to get available Schemes in the ComboBOx List?
Tuesday, September 01, 2009 7:32 AMcomboBox1.Cursor=Cursors.Hand;
family as water
Tuesday, September 01, 2009 7:33 AMHere a sample, I have the cursor as a bitmap in resource.
private Cursor HandClosed;
In Contstructor of my form:
// Create custom cursors
Bitmap test = Properties.Resources.HandClose;
HandClosed = new Cursor(test.GetHicon());
And I use it on a panel, this line is in a mouse move event, because I change the cursor depending on its postion:
panel4.Cursor = HandClosed;
Hopefully this helps.
Tuesday, September 01, 2009 8:52 AMHi,
Sorry guys..Thanks for you reply.
I dont mean to change cursor in my application or particular panel
I want to change cursor in entire OS itself. Like what do u do in Controlpanel.
My all other cursor like busy etc should change accordingly.
Thats y i am expecting some APIs?
Tuesday, September 01, 2009 9:24 AMOkay, you have to change them in registry: HKEY_current_user\Control panel\Cursors\
and then you should inform the system of it see for a VB example at:
Searching little further: http://msdn.microsoft.com/en-us/library/ms724947%28VS.85%29.aspx
At the bottom is the C# definition for the function.
[DllImport("user32.dll", EntryPoint = "SystemParametersInfo")]
public static extern bool SystemParametersInfo(uint uiAction, uint uiParam, uint pvParam, uint fWinIni);
Wednesday, February 29, 2012 10:39 AM
Hi, it's an old thread but i need it. I'm trying to change my cursor in Window through a WPF application. It seem i have to change the registry to have it work out of the application. So i try this code but i don't see what parameter put for int pvParam.
On this thread it seem it's 'null' (http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/977e2f40-3222-4e13-90ea-4e8d0cdf289c/) but Visual studio told ma that he can't convert <null> to uint. So i'm lost and i don't know what to do.