G
ganeshgebhard
Guest
Hi,
I have a pictureBox1 with an image in it and I have label1 and label2. I have the X and Y coordinates of the pictureBox1 into label1 and label2 (label1 = X and label2 = Y).
Now comes the problem:
The coordinate (0;0) is at the top-left of the image, but I want that (0;0) is the exact center of the image..
Can someone help?
Code:
private void listBox1_MouseMove(object sender, MouseEventArgs e)
{
label1.Text = e.X + "";
label2.Text = e.Y + "";
}
Continue reading...
I have a pictureBox1 with an image in it and I have label1 and label2. I have the X and Y coordinates of the pictureBox1 into label1 and label2 (label1 = X and label2 = Y).
Now comes the problem:
The coordinate (0;0) is at the top-left of the image, but I want that (0;0) is the exact center of the image..
Can someone help?
Code:
private void listBox1_MouseMove(object sender, MouseEventArgs e)
{
label1.Text = e.X + "";
label2.Text = e.Y + "";
}
Continue reading...