I'm trying to learn DirectX via SharpDX, very new to this. What I want to do is be able to draw 2D shapes for a game I'm trying to make. So I started with the demo "MiniRect" that came with SharpDX. Since I want my game to be full-screen, I changed the RenderForm to be maximized (using WindowState) and set the FromBorderStyle to None.

I noticed that even if the form is set to maximized, it's size is always 800 by 600. In my renderloop, if I specify the location for the rectangle has 400 by 300, it is drawn in the middle of the screen. If I try to set the location via mouse-click (using the RenderForm's MouseClick event, there is always an offset present between where the mouse was clicked and where the drawing shows up. My system DPI is set to the standard (96) so there shouldn't be any scaling. But it looks like there is a scaling factor of about 2.4

If it's not the DPI settings, does anyone have any idea what this be related to? The problem doesnt happen if the RenderForm is not maximized. Is there another way to be drawing full-screen using SharpDX?



1 Answer 1


I found the problem.

I have maximized the size of the renderform, but forgot to change the size of the buffers in the swapchain. Once I got the new form size using form.MaximumSize and set that in the SwapChainDescription, my graphics were no longer stretched out.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .