Question

Now, I have an icon (Path : Mini-Project\Mni_Project\Mni_Project\Icon\mouse_cursor.ico).

enter image description here

I want to change the mouse cursor image to this icon.

There is no way for me to change the cursor image in the property window. enter image description here

I have tried : (Do not work.)

//this->Cursor = System::Windows::Forms::Cursors::Hand;
this->Cursor = LoadImage(NULL, "Icon\\mouse_cursor.ico", IMAGE_ICON, 0, 0, LR_DEFAULTSIZE);

How can I change the mouse cursor icon?

Thank you for your attention.

Pas de solution correcte

Autres conseils

Try this code

this->Cursor = gcnew System::Windows::Forms::Cursor("Icon\\mouse_cursor.ico");
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top