Home:ALL Converter>Visual Studio Windows forms C# is there a way to make a picture box look at the cursor?

Visual Studio Windows forms C# is there a way to make a picture box look at the cursor?

Ask Time:2022-08-11T06:32:29         Author:Magic

Json Formatter

I am doing a project for coursework which is why I am using VS2019 windows forms. I've been trying to get a picture box to look at the cursor and I've not found a solution, This image shows what I want to achieve, the circle with an arrow is the character, the arrow is the direction the character is looking at, and the triangle on the stick is the cursor and the character will always look in the direction of the mouse cursor, so when the mouse cursor moves so does the picture box to look in the cursor's direction. The picture box's only rotates when the mouse cursor moves, it doesn't change it's location but just rotates to look in the direction of the mouse pointer.

Author:Magic,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/73313417/visual-studio-windows-forms-c-sharp-is-there-a-way-to-make-a-picture-box-look-at
yy