|
Hi guys/gals:
I build a simple test program in VC# 2005 that's just a window that tells me my mouse position and the window size, the thing is that if I move my mouse to the edge of the window the window size and the mouse position are different in this example case I have mouse pos 426 and window height 423. Is this something to do with different coordinate systems or something? ...
To get the mouse position on the mouse move event I do:
[source]
private void Graficador_MouseMove(object sender, MouseEventArgs e) { x = e.X.ToString(); y = label2.Text = e.Y.ToString(); } [/source]
to get the window size I do: [source]
private void Graficador_Load(object sender, EventArgs e) { h = this.Height; w = this.Width; } [/source]
Thanks in advance,
G |