Bonsoir a tous,
je cherche a connaitre la position de la souris dans un contrôle Image.
La position relative dans le contrôle.
Cependant j'ai toujours 0 - 0 ...
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 private void Test_MouseMove(object sender, MouseEventArgs e) { Image Im = sender as Image; Double Height = Im.Height; Double Width = Im.Width; Point p = new Point(); Im.PointFromScreen(p); this.Button_Connect.Content = Convert.ToString(p.X) + " - " + Convert.ToString(p.Y); }
Avez-vous une idées ?
Cordialement,
NeoKript
Partager