What Laurent said is correct of course, but three other things.
Mouse.GetPosition().Y
If you are using events then just use the position provided by the event args, no need to query real time information when it is already provided. Not to mention if your code is running slowly, by the time you process the event the mouse may have moved. Then stuff will happen like your sprite moving to the wrong location because you are basing your code on realtime positioning, not the position where the event happened.
private void OnTimedEvent(object source, ElapsedEventArgs e)
Don't use these timers and expect to get proper movement, they have a very low resolution and may not even execute the callback when you expect.
Instead measure the delta time that elapses between frames and use that. If you don't want to use
System.Diagnostics.Stopwatch directly then look at NetEXT (see my signature). I have provided nice wrappers for easy handling and measuring of high resolution time with an API similar to
sf::Clock and
sf::Time.
myProgram
.app = new RenderWindow
(new VideoMode
(5000,
5000),
"Game", Styles
.Fullscreen);VideoMode mode
= VideoMode
.DesktopMode;View view
= new View
(new Vector2f
(mode
.Width/2, mode
.Height/2),
new Vector2f
(mode
.Width, mode
.Height));Not sure how that is supposed to work, considering you should probably be using the desktop mode for window creation and the absolute size for the view creation