screen-resolution

Get the real screen resolution on Ice Cream Sandwich

半世苍凉 提交于 2019-11-29 18:04:40
问题 Devices with Ice Cream Sandwich can use on-screen soft keys, and this means that some of the screen estate is taken by these keys. I need to get the real screen resolution, and not the resolution minus the space taken up by the soft keys. I've tried the following, but neither works: Display display = getWindowManager().getDefaultDisplay(); int width = display.getWidth(); int height = display.getHeight(); Log.d("SCREEN RES", "Width: " + width + ". Height: " + height); DisplayMetrics metrics =

Cocoa Point vs Pixel and PPI

主宰稳场 提交于 2019-11-29 16:44:16
Well, I have basically two questions regarding screen resolution in iOS devices. 1) In iOS documentation, on the Point vs Pixels section, it states the coordinates are passed in to framework as points, and that "One point does not necessarily correspond to one pixel on the screen." as found here: https://developer.apple.com/library/ios/#documentation/WindowsViews/Conceptual/ViewPG_iPhoneOS/WindowsandViews/WindowsandViews.html When they are different? Up until now I was assuming they were equal and passing in pixel coordinates. Is this a parameter that changes from device to device? 2) I'm also

How to get the Monitor Screen Resolution from a hWnd?

半城伤御伤魂 提交于 2019-11-29 12:17:11
问题 How to get the monitor screen resolution from a hWnd? I am using a hWnd because the window could be located on any one of multiple monitors. i.e. the hWnd top/left coordinate is on a Monitor that has a Screen Resolution of 800 x 600. I program in a language called PL/B and it allows calling Windows API. What Window APIs can be used? 回答1: The user32 function MonitorFromWindow allows you to pass in an hwnd, and returns a handle to the monitor it's on (or a default - see the linked MSDN article

How to support various iphone screen sizes as of 2014?

本小妞迷上赌 提交于 2019-11-29 10:46:03
I'm almost done building my first iPhone app and am trying to add a background image, and am finding it a little confusing, because nowadays there's like 3 or 4 different size screens among the different iPhone versions, with different resolutions to boot. So while I'm aware of the whole image@2x.png thing, I still don't know what I really need. If I want my app to run on iPhone 4/4s, 5s/5c, 6/6+, how many different versions of a background image do I need, and at what sizes and resolutions? I have googled around and have not found any cohesive answers up to date for 2014. Also, if the iPhone

How can I change Windows 10 Display Scaling Programmatically using C#

感情迁移 提交于 2019-11-29 10:43:57
I'm trying to find a way to change the Display Scaling in Windows 10 Programmatically using C#. Let me also say that, I'm not trying to create a application that automatically forces the users screen to change resolution/scaling. Its just a tool for me to beable to toggle scales from the tray, as its something I often have to do for testing. So purposely designed for this action. So, I was able to track down what registry entries ( HKEY_CURRENT_USER\Control Panel\Desktop ) are set when a User does this manually via the official dialog seen below: However, obviously working with the registry

Resolution independent or monitor size independent WPF apps

大兔子大兔子 提交于 2019-11-29 07:50:49
how could i develop resolution independent and monitor size independent wpf apps. monitor size independent means here suppose i develop a wpf apps in 15inch monitor and when i will view that apps in 17 inch monitor then often UI looks different so how could i get rid of this problem in WPF. please guide in detail. thanks What you are looking for is Liquid Layout in WPF. Avoid specifying explicit Width and Height for your elements and it should scale up to whatever screen resolution available. Of course, MinWidth , MaxWidth and MinHeight, MaxHeight are also useful in restricting the size.

screen.width and screen.availwidth difference in javascript

亡梦爱人 提交于 2019-11-29 06:11:39
What is the difference between screen.width and screen.availwidth in JavaScript? On my system both are the same! alex Some things block some of your viewport, such a history/bookmarks side panel. This includes the taskbar, unless it's on Autohide Then window.screen.width != window.screen.availWidth . :) If you are drawing things to the viewport, you ought to use availWidth / availHeight to determine if things are off the viewport etc. Be sure to recalculate on window resize otherwise you won't know when the sidepanel has been closed. Note that not all of the width given by this property may be

Hide A DIV if screen is narrower than 1024px

≯℡__Kan透↙ 提交于 2019-11-29 04:37:19
I found (from this question - Hide div if screen is smaller than a certain width ) this piece of coding $(document).ready(function () { if (screen.width < 1024) { $("#floatdiv").hide(); } else { $("#floatdiv").show(); } }); The only problem is, I cannot seem to get the code to work, I only need to code to work for IE, I'm going to use Media Queries for other (newer) browsers. Any hints/tips on where I'm going wrong? So far I have <div id="floatdiv"> Then at the end of that div (where is closes) I have <!--[if lt IE 9]> <script type="text/javascript" src="http://dl.dropbox.com/u/17087195

Can I detect the display size/resolution in Emacs?

谁都会走 提交于 2019-11-28 22:45:38
问题 I'd like to change the window/frame size of my XEmacs based on the current display resolution. This is useful when I run my laptop either by itself or attached to a docking station with an external monitor. In either situation, I'd like Emacs to detect the primary screen resolution and adjust its main window frame size accordingly when I start it up. 回答1: The current display resolution is available using the following functions (both non-interactive). (x-display-pixel-width) (x-display-pixel

How to get screen resolution of your android device..? [duplicate]

女生的网名这么多〃 提交于 2019-11-28 20:29:12
This question already has an answer here: Get screen dimensions in pixels 39 answers Can i get resolution of android phone..? if yes then how..? it will really helpful for me.. Thank you.. K_Anas If you want the display dimensions in pixels you can use getSize: Display display = getWindowManager().getDefaultDisplay(); Point size = new Point(); display.getSize(size); int width = size.x; int height = size.y; This method was introduced in Android API 13, so if you want to get display metrics for previous APIs use: DisplayMetrics displaymetrics = new DisplayMetrics(); getWindowManager()