Click here to Skip to main content
15,890,506 members
Home / Discussions / C#
   

C#

 
GeneralRe: Change Cursor Mouse for an image in application but when close app return to the initial state Pin
Member 130142788-Mar-17 7:12
Member 130142788-Mar-17 7:12 
GeneralRe: Change Cursor Mouse for an image in application but when close app return to the initial state Pin
Eddy Vluggen9-Mar-17 2:24
professionalEddy Vluggen9-Mar-17 2:24 
GeneralRe: Change Cursor Mouse for an image in application but when close app return to the initial state Pin
Member 130142789-Mar-17 3:11
Member 130142789-Mar-17 3:11 
GeneralRe: Change Cursor Mouse for an image in application but when close app return to the initial state Pin
Eddy Vluggen9-Mar-17 3:45
professionalEddy Vluggen9-Mar-17 3:45 
GeneralRe: Change Cursor Mouse for an image in application but when close app return to the initial state Pin
Member 130142789-Mar-17 4:03
Member 130142789-Mar-17 4:03 
GeneralRe: Change Cursor Mouse for an image in application but when close app return to the initial state Pin
Eddy Vluggen9-Mar-17 4:20
professionalEddy Vluggen9-Mar-17 4:20 
GeneralRe: Change Cursor Mouse for an image in application but when close app return to the initial state Pin
Member 130142789-Mar-17 6:39
Member 130142789-Mar-17 6:39 
GeneralRe: Change Cursor Mouse for an image in application but when close app return to the initial state Pin
Eddy Vluggen9-Mar-17 9:33
professionalEddy Vluggen9-Mar-17 9:33 
Yes, that's the one; you'll need this[^] - if you read that, you'll notice that the call could fail. To use my computer as an example, the "current desktop" is not always the normal windows desktop.

Next thing to notice is that the call does not return a C# location on a Screen object, but screen-coordinates. You may need to convert or translate that to get a C#-point. Once you have that, you can set the top and left-properties of your small form to that location.

The form would also need to be the "topmost" form, otherwise it will sometimes dissapear behind other windows. The problem with "topmost" is that there might be multiple applications wanting to claim the same thing.

That would be one possible solution. Another might be to replace the entire cursor. It should be possible to get the current settings of the user and find out the current cursor, to load that as an image, add your image to that, and replace the entire cursor with the newly merged image. That would create conflicts in applications where the cursor changes (like to the hourglass, or on mouseovers) though.

I'd consider both a 'hackish' solution, and I doubt MS supports such a scenario. You may want to use the MSDN forums to check if there is a supported way to achieve the same (which will add complexity, ofc).
Bastard Programmer from Hell Suspicious | :suss:
If you can't read my code, try converting it here[^]

GeneralRe: Change Cursor Mouse for an image in application but when close app return to the initial state Pin
Member 1301427810-Mar-17 0:50
Member 1301427810-Mar-17 0:50 
GeneralRe: Change Cursor Mouse for an image in application but when close app return to the initial state Pin
Eddy Vluggen10-Mar-17 2:47
professionalEddy Vluggen10-Mar-17 2:47 
GeneralRe: Change Cursor Mouse for an image in application but when close app return to the initial state Pin
Member 1301427813-Mar-17 6:21
Member 1301427813-Mar-17 6:21 
Question.NET core, standart and desktop app (using VS2017) (trying to replace PCL) Pin
Super Lloyd8-Mar-17 4:04
Super Lloyd8-Mar-17 4:04 
QuestionPlotting serial port data using zedgraph (data vs time) Pin
Ram _Varman8-Mar-17 1:51
Ram _Varman8-Mar-17 1:51 
AnswerRe: Plotting serial port data using zedgraph (data vs time) Pin
Garth J Lancaster8-Mar-17 2:15
professionalGarth J Lancaster8-Mar-17 2:15 
GeneralRe: Plotting serial port data using zedgraph (data vs time) Pin
Ram _Varman8-Mar-17 2:17
Ram _Varman8-Mar-17 2:17 
AnswerRe: Plotting serial port data using zedgraph (data vs time) Pin
Gerry Schmitz8-Mar-17 6:39
mveGerry Schmitz8-Mar-17 6:39 
GeneralRe: Plotting serial port data using zedgraph (data vs time) Pin
Ram _Varman9-Mar-17 2:59
Ram _Varman9-Mar-17 2:59 
GeneralRe: Plotting serial port data using zedgraph (data vs time) Pin
Gerry Schmitz9-Mar-17 6:08
mveGerry Schmitz9-Mar-17 6:08 
Questionreferencing a dll available in a different folder from a Windows Service without copying the dll Pin
govindarajan k8-Mar-17 0:24
govindarajan k8-Mar-17 0:24 
AnswerRe: referencing a dll available in a different folder from a Windows Service without copying the dll Pin
Pete O'Hanlon8-Mar-17 0:40
mvePete O'Hanlon8-Mar-17 0:40 
AnswerRe: referencing a dll available in a different folder from a Windows Service without copying the dll Pin
Alan N8-Mar-17 3:58
Alan N8-Mar-17 3:58 
GeneralRe: referencing a dll available in a different folder from a Windows Service without copying the dll Pin
govindarajan k9-Mar-17 0:27
govindarajan k9-Mar-17 0:27 
QuestionLINQ error string matching? Pin
Member 28240516-Mar-17 4:41
Member 28240516-Mar-17 4:41 
AnswerRe: LINQ error string matching? Pin
Richard Deeming6-Mar-17 5:36
mveRichard Deeming6-Mar-17 5:36 
GeneralRe: LINQ error string matching? Pin
Member 28240516-Mar-17 20:28
Member 28240516-Mar-17 20:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.