Change cursor while mouse dragging [duplicate] - c#

This question already has answers here:
How can i change the cursor (image) in the whole windows OS
(3 answers)
Closed 7 years ago.
I would like to implement the next construction in .NET in a WPF application.
There is a window, and in it there is a little picture, e.g.: 16×16.
If i move the mouse above the picture, and pressed the left button (without release), the cursor will change to this picture until i release the button.
Between the press and release i would like to drag out this cursor image outside the application window.
How can i implement this feature without modifying system registry values?
Thanks in advance,
Peter

You cannot change the Windows cursor without changing the registry. This has been discussed before: How can i change the cursor (image) in the whole windows OS

Related

How can I get the coordinates of a click on the screen [duplicate]

This question already has answers here:
Getting Position of mouse cursor when clicked out side the form's boundary
(5 answers)
Closed 8 years ago.
i'm trying to automate some actions with a c# bot. The program should work in this way:
a. the user add actions to a list of actions that the bot will use after the setup.
b. for example the user add the "auto-click" action.
c. then the program hide his window to let the user click and get the coordinates.
Now, I know how to hide the program window but I don't know how to manage how to get the coordinates of the screen when the user clicks. do anybody know how to achieve this?
Edit: my question is a bit different from the one posted below, i'm not trying to detect mouse clicks in the main form...
you might be looking for this
How to get mouse pointer position using javascript for internet explorer?
One of the answer conrtains cross browser solution not just IE.

Windows Desktop Size changed event? [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Detect change of resolution c# WinForms
I have an application written in C# where my window is docked to the edge of the screen.
I need to know where I can find the event if the resolution has changed so I can call the Dock method so I can repaint my window.
On the form object I can only see the SystemColorsChanged event.
You're looking for the SystemEvents.DisplaySettingsChanged event.

Run to cursor in VisualStudio 2012 [duplicate]

This question already has answers here:
What is the shortcut key for Run to cursor
(4 answers)
Closed 3 years ago.
I can not see the Run To Cursor in VS 2012 when I am developing in C#. I checked the tool bar and also DEBUG menu and in both places there is no such entry. Where can I find this option.
You can still use the keyboard shortcut Ctrl+F10. Otherwise you can right click on the line you want to run to and select Run to cursor.
You can add the button to the toolbar by selecting Add or Remove buttons on the Debug toolbar and then selecting Customize.

Prevent window from snapping to screen edges [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How do you disable Aero Snap in an application?
Is there a way to prevent a WPF window from snapping to screen edges (i.e. Aero snap)?
I know this can be disabled by the user in the OS, but I want to prevent only my window from getting rearranged.
For example, modal windows do not get snapped like that. I imagine it can be set for a WPF window as well, but I do not know how.
There's no direct way of doing this except you set ResizeMode="NoResize" and implement the resize behavior manually or EXTREME SOLUTION could be (on an application basis) modifying a shortcut to your .exe, on the Compatibility tab, check "Disable desktop composition".

How to find Windows Taskbar location and size? [duplicate]

This question already has answers here:
How do I get the taskbar's position and size?
(10 answers)
Closed 9 years ago.
I have created an application that runs in the system tray. When the user single- clicks the try icon, a small form comes up in the bottom right corner of the screen, i.e. right above the system tray. The form is basically "sticky" to the tray.
Here is my question: How do I accomplish the same thing, even if the user has the taskbar docked somewhere else? Like at the top of the screen, or one of the sides?
It shouldn't be hard, since I figure all I have to do is find out where the taskbar is. Is it at the bottom, the top, or one of the sides. But I can't find any documentation anywhere, that explains how to get the location and position of the taskbar.
Any one has any idea about this ?
It's a window, so find it's HWND and then get the window coordinates. The class name you're looking for is "TrayNotifyWnd".

Categories