screen-resolution

Change Resolution Of Form Based On Screen Resolution ( without changing monitor resolution and using Maximized screen option )

前提是你 提交于 2019-12-01 19:21:56
I searched on the forums, and I tried a few things... but they didn't really seem to work. Let me lay out my problem. I have a very high screen resolution on my laptop: 1400x1050. I'm designing my app on this. My colleague tried it out on his laptop (which had lesser resolution), and the application did not fit on his laptop. The buttons were dragging out of the screen space. So, I want my application to automatically resize/adjust based upon the screen resolution. I found some similar forums, and I tried a few things suggested by developers, but that did not really work out for me. I tried :

Detect real screen resolution (ignoring browser zoom etc.)

回眸只為那壹抹淺笑 提交于 2019-12-01 17:59:11
问题 I need to get the real screen resolution using JavaScript (client-side at least), but having issues with both IE and Firefox as they tend to change this when you use the browser's built-in zoom. How can this be done in a cross-browser friendly manner? 回答1: function getDimension() { var width = 0, height = 0; if( typeof( window.innerWidth ) == 'number' ) { height = window.innerHeight; width = window.innerWidth; } else if( document.documentElement && ( document.documentElement.clientWidth ||

What parameters does the css media type “handheld” care about?

大憨熊 提交于 2019-12-01 17:05:29
问题 I need to change style on a page depending on if it's a handheld device (such as a cell phone) or a large screen device, such as a laptop, stationary pc or a tablet. I know I could detect the resolution by the css max-width query and alike, but that does not feel convincing. Mainly because today's smartphones have such high-res screens. I.E. the Sony Xperia S, it has got a 720p by 1280 screen, but it's only 4,3". Whereby a 10px font, which on a normal computer screen would be readable, will

Detect screen resolution change made by user (Java Listener?)

心已入冬 提交于 2019-12-01 15:54:10
I have a Java app that launches, creates a GUI and works great. If the user changes the screen resolution (switches from 1440x900 to 1280x768), I'd like to be able to listen for that event. Any ideas? PS - I'd like to do this in event/listener mode, not in poll mode, so that extra CPU cycles aren't wasted on something like a timer constantly polling the screen size every N seconds to see if it's changed. This post is old, but: - polling the screen size once every second will not have any impact on performance - when the screen is resized, every window should receive a repaint() call (you need

Detect screen resolution change made by user (Java Listener?)

ぐ巨炮叔叔 提交于 2019-12-01 14:57:41
问题 I have a Java app that launches, creates a GUI and works great. If the user changes the screen resolution (switches from 1440x900 to 1280x768), I'd like to be able to listen for that event. Any ideas? PS - I'd like to do this in event/listener mode, not in poll mode, so that extra CPU cycles aren't wasted on something like a timer constantly polling the screen size every N seconds to see if it's changed. 回答1: This post is old, but: - polling the screen size once every second will not have any

getting screen width into javascript variable and sending it through ajax to a php page to avoid page load

自古美人都是妖i 提交于 2019-12-01 13:56:29
This is the JS to detect the screen resolution on my page naming index.html and sending it to php, so that the values can be retrived using $_GET :- <script type="text/javascript"> width = screen.availwidth; height = screen.availheight; if (width > 0 && height >0) { window.location.href = "http://localhost/main.php?width=" + width + "&height=" + height; } else exit(); </script> This is the content of my PHP file naming process.php :- <?php $screen_width = $_GET['width']; $screen_height = $_GET['height']; //EDITED PORTION echo '<style>#Wrapper {width:'.$screen_width.';}</style>'; ?> Now after

How does Android define a screen resolution as long?

痞子三分冷 提交于 2019-12-01 09:12:45
With Android, you can define different resources for different phone attribute by naming res directories appropriately. I need to be able to support different layouts for 480x800 and 480x854 . I figured I could have one set of resources stored in the layout-hdpi-v4 directory and another in layout-long-hdpi-v4. However, both resolution seem to think that they are long (at least based on the emulator, which I understand may not reflect devices accurately). Is there another way in which I can distinguish between the two resolutions/aspect ratios? There is a screen size qualifier , though its use

Adjusting worksheet zoom level based on screen resolution

泄露秘密 提交于 2019-12-01 06:27:47
I have an Excel 2003 macro to adjust my screen zoom based on the screen resolution. Sub Macro1() Dim maxWidth As Long, myWidth As Long Dim myZoom As Single maxWidth = Application.UsableWidth * 0.96 'I use r because upto r i have macro buttons myWidth = ThisWorkbook.ActiveSheet.Range("r1").Left myZoom = maxWidth / myWidth ActiveWindow.Zoom = myZoom * 100 End Sub When I try in Excel 2003, button size & its caption are not zooming properly. And Application.UsableWidth is always returning 1026 as width for either the screen resolution 1024*768 or 1366*768. Any ideas? I want the Excel sheet to be

Adjusting worksheet zoom level based on screen resolution

别等时光非礼了梦想. 提交于 2019-12-01 04:41:23
问题 I have an Excel 2003 macro to adjust my screen zoom based on the screen resolution. Sub Macro1() Dim maxWidth As Long, myWidth As Long Dim myZoom As Single maxWidth = Application.UsableWidth * 0.96 'I use r because upto r i have macro buttons myWidth = ThisWorkbook.ActiveSheet.Range("r1").Left myZoom = maxWidth / myWidth ActiveWindow.Zoom = myZoom * 100 End Sub When I try in Excel 2003, button size & its caption are not zooming properly. And Application.UsableWidth is always returning 1026 as