I'm trying to place an object to my cursor location, but there is a giant offset? Why?
private void Form1_MouseMove(object sender, MouseEventArgs e)
{
if (moving == true)
{
panel1.Location = Cursor.Position;
}
}
I'm trying to place an object to my cursor location, but there is a giant offset? Why?
private void Form1_MouseMove(object sender, MouseEventArgs e)
{
if (moving == true)
{
panel1.Location = Cursor.Position;
}
}
Cursor.Position is "the cursor's position in screen coordinates". Use the MouseEventArgs, as shown in this dup