screen-resolution

How to list available video modes using C#?

六眼飞鱼酱① 提交于 2019-11-27 02:01:45
I've found nice examples using C++ ( http://www.codeproject.com/KB/tips/resswitch.aspx ), but not in C#. Can someone help, please? Edit: The exact function that list the video modes is: BOOL CVideoModes::GetAvailableVideoModes(CAvailableVideoModes& modes) { modes.SetSize(0, 5); int i=0; DEVMODE dm; while (EnumDisplaySettings(NULL, i, &dm)) { CVideoMode thismode(dm.dmBitsPerPel, dm.dmPelsWidth, dm.dmPelsHeight, dm.dmDisplayFrequency); modes.SetAtGrow(i, thismode); ++i; } modes.FreeExtra(); return (i>0); } But sincerelly I cannot understand that C++ code. Where I can find that "thismode"

How to accommodate for the iPhone 4 screen resolution?

三世轮回 提交于 2019-11-27 01:02:37
According to Apple , the iPhone 4 has a new and better screen resolution: 3.5-inch (diagonal) widescreen Multi-Touch display 960-by-640-pixel resolution at 326 ppi This little detail affects our apps in a heavy way. Most of the demo apps on the net have one thing in common: They position views in the believe that the screen has a fixed size of 320 x 480 pixels. So what most (if not all) developers do is: they designed everything in such a way, that a touchable area is (for example) 50 x 50 pixels big. Just enough to tap it. Things have been positioned relative to the upper left, to reach a

Changing iPad/iPhone simulator resolution for Xcode 4.3.2 [duplicate]

女生的网名这么多〃 提交于 2019-11-26 21:48:23
问题 This question already has an answer here: How to resize the iPhone/iPad Simulator? 11 answers I am working on a Philips 19" and upgraded Xcode to version 4.3.2. On the new "Retina Display" on iPad 3 (oh, sorry, on The New iPad) my iPad simulator changes it's resolution and the simulator has vertical and horizontal scroll bars! How do I change the resolution of the an iOS simulator? 回答1: The following hotkeys should be helpful: Command ⌘ + 1 (100%) Command ⌘ + 2 (75%) Command ⌘ + 3 (50%)

C#: Get complete desktop size?

人走茶凉 提交于 2019-11-26 20:11:09
How do I find out the size of the entire desktop? Not the "working area" and not the "screen resolution", both of which refer to only one screen. I want to find out the total width and height of the virtual desktop of which each monitor is showing only a part. You have two options: PresentationFramework.dll SystemParameters.VirtualScreenWidth SystemParameters.VirtualScreenHeight System.Windows.Forms.dll SystemInformation.VirtualScreen.Width SystemInformation.VirtualScreen.Height Use the first option if you developing a WPF application. I think it's time to bring this answer up to date with a

Multiple screen resolution [duplicate]

允我心安 提交于 2019-11-26 19:03:17
This question already has an answer here: How do you make layouts for several Android screen sizes? 3 answers I am developing the app in 320*480. How do make the app to be run in 480*854 screen? When i tried to run in 480*854 screen, the app original design looks like small. Do I want to create separate layouts for each screen in android? If so, please provide me the sample hint to proceed. I have implemented my own way of Handling Multiple Screen Resolutions . You could certainly avoid this problem by setting LayoutParams at run time in terms of Percentage The Problem occurs only with Views

Get and Set Screen Resolution

一笑奈何 提交于 2019-11-26 18:52:43
How can I collect and change screen resolution using Visual C#? For retrieving the screen resolution, you're going to want to use the System.Windows.Forms.Screen class. The Screen.AllScreens property can be used to access a collection of all of the displays on the system, or you can use the Screen.PrimaryScreen property to access the primary display. The Screen class has a property called Bounds , which you can use to determine the resolution of the current instance of the class. For example, to determine the resolution of the current screen: Rectangle resolution = Screen.PrimaryScreen.Bounds;

Only use XHDPI drawables in Android app?

独自空忆成欢 提交于 2019-11-26 18:00:53
问题 If you're planning to support LDPI, MDPI, HPDI, and perhaps XHDPI in the near future, is it ok to only include XHDPI drawables in the project and let the devices scale them to their desired resolution? I've tested to resize the drawables into MDPI and HDPI in Photoshop and then compared the result with XHDPI drawables only resized by Android, and I can't see any difference at all. Is it bad design to take this shortcut? It would be nice to not have to resize each and every drawable into 3

Switch android x86 screen resolution

让人想犯罪 __ 提交于 2019-11-26 17:53:59
问题 I would like to use Android-x86 2.2 as an emulator on my Windows 7. I have downloaded VirtualBox and the ISO, and I've made a virtual machine with it, but I can't set the resolution to 320x480 or something similar. The following tutorial "Using the Android-x86 Port as your Emulator" suggests to insert: <ExtraDataItem name="CustomVideoMode2" value="320x480x16" /> to my .vbox file and I did it. Then I added UVESA_MODE=320x480 and vga=ask to the boot config. When it boots, I have to press Enter

How to get the screen DPI in java?

笑着哭i 提交于 2019-11-26 17:15:32
问题 I am developing an app for which I need the screen DPI.. I checked a few forums and got a code snippet which goes as follows: Dimension screen = java.awt.Toolkit.getDefaultToolkit().getScreenSize(); System.out.println("screen width: "+screen.getWidth()); System.out.println("screen height: "+screen.getHeight()); int pixelPerInch=java.awt.Toolkit.getDefaultToolkit().getScreenResolution(); System.out.println("pixelPerInch: "+pixelPerInch); double height=screen.getHeight()/pixelPerInch; double

How to implement responsive web design and its best practices [closed]

若如初见. 提交于 2019-11-26 16:39:49
问题 I have a website which uses pixel to render the pages. But when i view the website in different devices having different screen resolution the whole page will not fit into screen and if i use percentage , the page content will get squeezed . Is the responsive web design is the right choice to design the web page. If so, I have got few concerns. What is the risk involved in converting existing web site to incorporate responsive design. Is there any framework available to do this and which is