screen-resolution

SetProcessDPIAware seems not to work under windows 10

眉间皱痕 提交于 2019-12-06 00:08:16
问题 I am trying to get the real screen resolution (in pixels) in a windows C++ app. When the windows dpi setting is changed, I get the virtual (adjusted) resolution instead of the real one. I have tried using SetProcessDPIAware, SetProcessDpiAwareness (with all three enumerated values as arguments) and a true setting in a manifest. In all three cases, the code works fine (i.e. shows the real resolution) in my windows 7 PC but not in a Win 10 one (here it ignores the DPI Aware setting and returns

How to get monitor/display resolution

给你一囗甜甜゛ 提交于 2019-12-05 23:02:02
As you know, monitors and displays are manufactured with some resolution. I need to get monitor/display resolution. I don't mean resolution of game window/fullscreen, I mean physical resolution of monitor/display. I need it to work both on Android and Windows. EDIT : I just found what i'm looking for is called NATIVE RESOLUTION Looks like i found solution. @Draco18s pointed to Screen class but what i'm looking for is called Display . Display class allows me to get native size of monitor or display in pixels. Looks like "Screen" class is used only for game window/full screen but for display as

Bad Swing UI scaling on high resolution (MS Surface)

允我心安 提交于 2019-12-05 20:20:02
问题 I'm currently working on a little Java application, that involves Swing GUIs. On my development PC everything looks fine but when I run it on my MS Surface, some icons seem to be too large for the components (or the components too small for the icons). Here's what I mean: Google research has lead me to conclude that this is due to Surface's high resolution and Win8's zooming to let some items appear a little larger. So I reset that zoom to 100% and it actually fixed the bad scaling.

Why is the scale representing screen size wrong in iOS for my iPad Mini?

女生的网名这么多〃 提交于 2019-12-05 19:56:46
I have a 1st generation iPad Mini ( Model A1432 ) with a screen resolution of 1024x768 ( documentation ). I have the following code in my app: CGRect screenBounds = [[UIScreen mainScreen] bounds]; CGFloat screenScale = [[UIScreen mainScreen] scale]; CGSize screenSize = CGSizeMake(screenBounds.size.width * screenScale, screenBounds.size.height * screenScale); screenSize.height and screenSize.width report: 2048x1536, which is wrong. The screenScale value is 2, but it is my understanding that it should only be 2 for retina screens, which the 1st generation iPad Mini is not. Any ideas why this

How to get screen resolution with node.js

半世苍凉 提交于 2019-12-05 19:32:12
I need get screen resolution with node.js, but the following code don't work. var w = screen.width; var h = screen.height; This also don't work. var w = window.screen.width; var h = window.screen.height; Someone know how to get screen resolution with node.js ? Thank you. charlie roberts There is now a screenres module via npm: https://www.npmjs.com/package/screenres You should retrieve the window.screen.width and window.screen.height in your client-side JavaScript code and send that information to your server-side Node.js application via AJAX, WebSocket, as form data, etc. For example:

How to change screen resolution programmatically [duplicate]

天大地大妈咪最大 提交于 2019-12-05 11:45:05
This question already has answers here : Programmatically change screen resolution? (4 answers) Closed 6 years ago . When my application is loaded system screen resolution needed to change to 1024 * 768. When its closed, it change to the original screen solution. How to achive this?. Any feasible solution is there? Basically I'm working with vb.net anyway I welcome a solution from C#. Changing the resolution is more difficult. This CodeProject describes how to do it in C# http://www.codeproject.com/KB/dotnet/changing-display-settings.aspx and you can use this following website to help you

Get screen resolution of device

前提是你 提交于 2019-12-05 10:20:17
I used following method to get the screen size: public static Point getScreenSize(Context context) { WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); int w = wm.getDefaultDisplay().getWidth(); int h = wm.getDefaultDisplay().getHeight(); return new Point(w, h); } On my samsung galaxy s6, this method returns 1080x1920... Although my device has a resolution of 1440x2560. Why? Is there a better method to get the screen resolution that works on newer phones reliable as well? EDIT I need this method in a service! I don't have a view/activity for help, only the

Layout displayed differently on different devices at the same resolution screen

*爱你&永不变心* 提交于 2019-12-05 04:06:07
Problem: layout displayed differently on different devices at the same resolution screen. I tested it on Samsung Galaxy S4 (1080x1920) and on LG G2 (1080x1920). It the same resolution, so why layout is displayed differently on each device ? I have all in layout folder and not have another layouts for other resolutions. Here are screens: Samsung Galaxy S4 http://www.image-share.com/ijpg-2963-272.html LG G2 http://www.image-share.com/ijpg-2963-271.html EDIT #1 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout

Get native resolution of screen

↘锁芯ラ 提交于 2019-12-05 02:31:58
Is there a way to get the native resolution of a screen in c#? The reason that I ask is that I have some curves and it is very important that they look the same no matter what resolution. When the screen isn't in native resolution they look somewhat different than before and I want to show a warning that that is the case. clamp From my experience the best solution is to extract that information from the monitors' EDID How to get the native resolution is answered in: How to fetch the NATIVE resolution of attached monitor from EDID file through VB6.0? i have made a little javascript that gets

How to connect in full screen mode to Linux CentOS 7 virtual machine?

我只是一个虾纸丫 提交于 2019-12-04 12:22:41
I'm connecting to CentOS 7 VM from Hyper-V from Windows 8.1. The full screen mode is not working. I need to fix that. Other VMs including CentOS 6 and Windows Server have no problems. These are some observations I made when I connect to that VM from Hyper-V Manager. CentOS 7, while booting, displays this warning "fast TSC calibration failed". I read that this is not a problem but I'm not sure. Everything else is working in the VM except not being able to work in the full screen mode of my laptop which has a pretty high resolution graphics card. Applications -> System Tools -> Settings ->