Try this code
this->Cursor = gcnew System::Windows::Forms::Cursor("Icon\\mouse_cursor.ico");
سؤال
Now, I have an icon (Path : Mini-Project\Mni_Project\Mni_Project\Icon\mouse_cursor.ico).
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.
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.
لا يوجد حل صحيح
نصائح أخرى
Try this code
this->Cursor = gcnew System::Windows::Forms::Cursor("Icon\\mouse_cursor.ico");