I have looked at every similar question and none work for me. I am programming a winForm that will show me the screen factor. I have tryed reading from Registry (doesnt work) i have tryed using DLL "gdi32.dll" , that works but only on Win10 not on Win7. I Have also tryed :
float dpiX, dpiY;
using (Graphics graphics = Graphics.FromHwnd(IntPtr.Zero))
{
dpiX = graphics.DpiX;
dpiY = graphics.DpiY;
}
but it doesnt work also. I know that this question is repeated but all the answers that were in the previous questions didnt help, so thats why i am opening a new one. So, can someone help me please?