C# how to get mouseover pos on a picture
-
How do I do a mouse over on a GIF picture? I want to get X and Y position on the gif I display over the form. Currently I can only see the mouseover pos on the form surface only not on the picture how do I do the opposite? Thanks Samuel
-
How do I do a mouse over on a GIF picture? I want to get X and Y position on the gif I display over the form. Currently I can only see the mouseover pos on the form surface only not on the picture how do I do the opposite? Thanks Samuel
-
How do I do a mouse over on a GIF picture? I want to get X and Y position on the gif I display over the form. Currently I can only see the mouseover pos on the form surface only not on the picture how do I do the opposite? Thanks Samuel
-
Hello, Is this picture in a pictureBox? If yes, you would have to handle MouseMove there! All the best, Martin
I am sorry, I dont know how to handle mousemove there? and yes its in a picture box. Do you have an example of how I can do this?? Thanks Samuel
-
I am sorry, I dont know how to handle mousemove there? and yes its in a picture box. Do you have an example of how I can do this?? Thanks Samuel
Hello,
this.pictureBox1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.pictureBox1_MouseMove);
private void pictureBox1_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{
string actmouseposition= "X: " + e.X + "; Y: " + e.Y;
}Hope it helps! All the best, Martin
-
Hello,
this.pictureBox1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.pictureBox1_MouseMove);
private void pictureBox1_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{
string actmouseposition= "X: " + e.X + "; Y: " + e.Y;
}Hope it helps! All the best, Martin
Yes! it works like a charm! Thanks lots! Thanks :) Samuel
-
Yes! it works like a charm! Thanks lots! Thanks :) Samuel