Add a custom mousepointer (*.cur)

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 4 years and 11 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
gijsbert
Posts: 3
Last visit: Thu Dec 14, 2023 2:19 am

Add a custom mousepointer (*.cur)

Post by gijsbert »

I would like to add a custom made mouse pointer to my powershell form.
Can anyone tell me if this is possible, en maybe how?
User avatar
mxtrinidad
Posts: 399
Last visit: Tue May 16, 2023 6:52 am

Re: Add a custom mousepointer (*.cur)

Post by mxtrinidad »

Sounds like a very nice feature to include in our PowerShell Studio product.
Please, feel free to add your request in our "Feature Request" area and we'll take a look at it.

https://www.sapien.com/requests
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Add a custom mousepointer (*.cur)

Post by davidc »

You can do this via your script:

Code: Select all

$form1.Cursor = New-Object System.Windows.Forms.Cursor -ArgumentList 'Path to cursor'
David
SAPIEN Technologies, Inc.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Add a custom mousepointer (*.cur)

Post by jvierra »

Here is a good explanation of how to manage cursors in Net Forms

https://www.c-sharpcorner.com/UploadFil ... n-C-Sharp/
This topic is 4 years and 11 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked