I am attempting to create a simple 2d level editor using xna and winforms.
I have used the app hub win form samples as a starting point. At first I was having trouble with the mouse coordinates but after setting the mouse handle to the control, it is working fine.
But now I want to implement scaling into the editor. I want the level editor to always be 720p. I have accomplished this by rendering to a render target set to 720 and then draw this using sprite batch to the back buffer. This also works great with letter boxing to keep the right ratio. I used the technique detailed here https://stackoverflow.com/questions/7591466/xna-resize-window-without-increasing-resolution.
However because of the letting boxing my mouse coordinates are now wrong again. Can someone help work out how to solve this? I tried getting the size of the letter box and subtracting that from the mouse coordinates but that didn't work.
Has anyone got any suggestions?