How can I change the cursor of a third part (Window/exe) ??  
Author Message
Deza





PostPosted: Visual C# General, How can I change the cursor of a third part (Window/exe) ?? Top

How can I change the cursor of a third part (Window/exe)

I have tried with WindowProc Api function, but it raised the CallBackOnCollectedDelegate exception/bug.

Thanks



Visual C#18  
 
 
ahmedilyas





PostPosted: Visual C# General, How can I change the cursor of a third part (Window/exe) ?? Top

you need to explain a bit more. What cursor are you referring to A mouse pointer What do you want to do with this cursor Change it to what exactly

 
 
Peter Ritchie





PostPosted: Visual C# General, How can I change the cursor of a third part (Window/exe) ?? Top

You can't. Mouse cursors for an application are set by the application in response to a WM_SETCURSOR message. You can't intercept that message and do anything different. If the handler for the WM_SETCURSOR uses a cursor from the applications resources you could edit the binary and get a different cursor--assuming the binary doesn't check for tampering.

 
 
xs594





PostPosted: Visual C# General, How can I change the cursor of a third part (Window/exe) ?? Top

I'm assuming you meant "third party" as in a window in a different process. The most common ways to inject code into another process and intercept events is with hooks and shell extensions. Check out MSDN, Advanced Windows Programming by Richter, and Visual C++ Windows Shell Programming by Esposito.