PDA

View Full Version : سوال: رزوليشن مانيتور



armm1388
چهارشنبه 25 اردیبهشت 1392, 10:10 صبح
با سلام خدمت دوستان
چگونه در C# رزوليشن مانيتور را بدست آورده و آن را تغيير دهيم؟
با تشكر فراوان

0935647
چهارشنبه 25 اردیبهشت 1392, 10:21 صبح
if you want to collect screen resolution you can run the following code within a WPF window (the window is what the this would refer to):

System.Windows.Media.Matrix m = PresentationSource.FromVisual(this).CompositionTar get.TransformToDevice;
Double dpiX = m.M11 * 96;
Double dpiY = m.M22 * 96;

0935647
چهارشنبه 25 اردیبهشت 1392, 10:25 صبح
Other Respond:
Rectangle resolution = Screen.PrimaryScreen.Bounds;

0935647
چهارشنبه 25 اردیبهشت 1392, 10:57 صبح
Dynamic Screen Resolution
http://www.codeproject.com/Articles/6810/Dynamic-Screen-Resolution