Detect physical screen dimensions - language-agnostic

I know that it is possible for a website to detect a user's screen dimensions in pixels, but is there a way to detect the physical size of a user's monitor (in inches)?

This is not always possible. Even the operating system might not know this information. In order to display properly on the screen the necessary information is the resolution that the monitor can display.
Think about using a projector. Depending on how far you place the projector away from the wall, the screen will become bigger or smaller. However, the computer will send the same picture to the projector. How would the software know about the distance to the wall and hence the size of the screen?

Not reliably.
Even monitors that believe to know their DPI - which isn't many - are often incorrect.

You could use EDID from the registry.
Please vote for this suggestion:
https://connect.microsoft.com/VisualStudio/feedback/details/526951/screen-object-physicalwidthincentimeters-physicalheightincentimeters-displaymode

Related

How are twips on a video projector calculated? Is there a possibility to configure?

My Ms Access(2010) database uses forms to display and manipulate data. Recently, when presenting these, I found out that the use of these forms on a video projector leads to a severe problem, the forms appear to be 'zoomed' in.
Therefore I have 2 questions, thanks for the answer!
1) How are twips on a video projector calculated? Theoretically this should depend on the distance between projector and screen, which woulnd't make too much sense. (I'd need this information to be able to explain the problem, thank you very very much)
2) How can this be configurated? Is it possible to use VBA or Win32 API to achieve this?
I don’t think this problem has anything to do with TWIPS or with the video projector. Any monitor (analogue, digital, projector, etc.) shows the same picture if it has the same resolution. If you set the output of your computer to i.e. 1024 * 768 pixels and the output device (analogue or digital monitor, projector, etc.) uses the same native resolution then the picture will look the same on each device.
Access works in pixels. If you have a form optimized for a specific amount of pixels then this is what Access uses. If you have a higher resolution then form will not fill the screen and if you have a smaller resolution the form will not be completely shown on the screen.
I guess what happens is that you use on your PC an output of i.e. 1600 * 1200 pixels but your projector can’t show this correctly. So the projector tries to convert i.e. 1600*1200 to 1024*768 and this will never look good.
I think you have two options: Check the resolution which your projector expects and set your PC to the same resolution. Or change your application – or the projector.
In line with what Edgar has suggested, regardless of the display type (projector, monitor etc...) the issue will remain the same. In this scenario, the problem is the form is designed for a given screen size, say 1600x900 (16:9) or 1920x1200 (16:10) or whatever you have chosen to design the form as.
The projector is likely not the same resolution as this. Many smaller projectors are either 1024x768 or 1280x720, both of which are likely smaller than your computer monitor in regards to resolution. While it is true that you could design the forms to the proper pixel dimension of the projector an easier way, that wouldn't require editing any content, would be to send the projector the same resolution that you have designed the forms to be.
For example, if your forms fit nicely on a 1920x1080 pixel space but your projector is 1024x768 then you could open display preferences on your computer and set the output to the projector to be 1920x1080. The projector will then scale the image to fit onto its 1024x768 panel.
There are many variables in here and you may run into equipment limitation with this approach, such as the projector not being capable of ingesting and scaling a given resolution which you are forcing into it. In that instance you could utilize a hardware video scaler inline between the computer and projector to perform the scaling operation for you. An example of a device capable of this would be a Barco ImagePro, though there are many other more cost-effective solutions on the market as well.

Is it necessary to fill in the appxmanifest with all tile resolution images?

The appxmanifest has entries for developers to fill in four different tile resolution images for each kind of tile (small, medium, wide, large), the different resolutions are: scale-180, scale-140, scale-100, scale-80.
From what I can tell if the developer fills in the largest resolution image (scale-180) the system will automatically scale it down when needed on lower resolution displays, thus it works everywhere. So do most developers really even need to bother filling in all the different tile resolution images? Seems like it will just bloat the size of the application for nothing.
My question about filling in the different resolution images not about whether I need to have the small, medium, wide and large images.
It's certainly not necessary, but it is recommended. Scaling images down (or up) can cause visual artifacts that may not be present in the original image. It may be the case that a particular image looks fine in all scaling plateaus, but others may not (this is especially true for bitmap images). Again, it is up to your discretion, but worth visual inspection at each scaling level.
MSDN has a scaling guidelines document that could be helpful.
See the reasons for filling wide tile and small tiles are for different reason.
1 - wide tile
if your app has a live tile notification feature then u need to implement it. But not mandatory. Just a criteria of metro app.
2 - small tile. This is the by default tile of the application so you should go ahead and add it. If theres no live tile concept then you can fill only small tile. The square one.
3 - then there is a place to put in the image that will be used as a tile icon when user searches for it.
and then there is store logo.
all these are by default set to one cross marked logo. Which u generally see. None of them are mandatory but finally while uploading to the store they will become requirement specific and mandatory. Otherwise you will get a long list of improvements to be done on your app from microsoft. :) . Have faced that .

Why Website with Retina-ready using original size image in PC?

Some Mobile website with Retina-ready using twice the size of image to get finer quality,
and using the original size of image in PC.
I don't understand why don't directly use twice the size of image in every device,
because Computers isn't so urgent need to save network traffic.
Prepare two different sizes of the picture is too spend time....
It is a Blind Spot ? or I am wrong ?..
=============================================================
Extra Content - 2013-07-10 :
The only questions is "they use original size image in PC, so why not just use twice size image in PC?"
it make same effect in Retina-ready, why PC need original size, PC didn't need ,right?
If I interpret your question correctly, the question is why don't websites use the same hi-res picture that they use for Retina displays on lower DPI monitors as well.
Then my reaction is, why should they?
A picture twice the size in pixels takes up four times the amount of bytes. That's not just bandwidth, but also memory in the client's computer
You don't gain anything in quality. If anything, the quality on screen decreases, if the browser's resize ability is not of the highest standard (read: if they optimise for speed rather than quality)
In addition, there are browsers that suffer a noticeable performance hit when you scroll up and down on a page with many resized images
Lastly, for the webdeveloper, creating smaller copies of the pictures before deploying them on the web server doesn't take up that much time. There are automated utilities that can do that, on the press of a button.

what is full screen mode

I know you can fake full screen by expanding a window and eliminating the title bar , status bar , and other stuff, I'm not interested in this, I want to know about "real" full screen mode (I don't know how to call it else) , like in games.
what exactly is full screen mode?
what win-api should I use to achieve this?
can this be used to play movies in full screen ? I know windows media player uses a fake full screen because I can "cut" thru it and see the desktop (using regions win-api).
can I "cut" thru "real" full screen like I thru a window (using regions win-api) ore is this directly writing to video memory and there is nothing "under" it?
Thanks!
If you want to make games on Windows in full-screen, the best option is XNA. This uses DirectX underneath, but hides a lot of the implementation details and plumbing to make it easy for the developer to start working on his game.
XNA is freely downloadable, and has good documentation.
XNA Game Studio 4.0 can be downloaded here.
...and you might want to support the "fake" fullscreen mode in addition to "real" fullscreen - it's very nice for those of us that run multi-monitor systems.
If you don't want to use DirectX, create window and call ChangeDisplaySettings with CDS_FULLSCREEN flag. OpenGL applications use this way to go fullscreen.
As far as a user is concerned, full screen is just when a window takes up the entire screen such that they no longer see any window borders or other desktop stuff.
As you know, not all full screens are created equal.
'proper' full screen is where the program takes control of the screen. When a game uses this mode, it can change the resolution of you screen. If you have ever played an old game and existed to see your icons all messed up, this is; for the duration of playing the game, your desktop was at a lower resolution.
with 'borderless full screen' the program window is striped of any borders, the title bar and frame etc., and is just a rectangle of pure rendering. If you then set this rendering context to be the same size as your desktop, you get the effect of full screen.
Doing border-less is usually the more user friendly way these days, as it is easier to 'tab out' as the other programs are still graphically around. 'proper' full screen gives you full control of the hardware, so in theory you have more power for your program, but it means you have to wait for things to reinitialise when you tab out.
what you do with your rendering context is up to you, so yes, you can use it play videos. It would not matter if you are in 'proper' full screen or not, the rendering code would be the same.
As for cutting through proper full screen windows, I am not sure, but I think there would be nothing else to see, there is only your program.
as for what win-api, there is only one windows api, but I think you mean, what windowing library; as this is getting to be a long answer already, I shall just say it depends a lot on what you want from it.
Please feel free to leave comments if you need me to clarify or expand on any points.

what is the meaning of "Best viewed at 1024 X 768"?

I am in the process of designing web-app, and would like to know what the following statement means/claims to be "Best viewed at 1024 x 768" ?
Does it mean if my monitor is set to 1024 * 768 and I browse that site which claims to support this resolution , I will not get horizontal/vertical scroll bars or does it mean something else.What care should one take during the design to make sure it adheres to this resolution ?
Thanks
It means that the site is best viewed with a 1024x768 screen resolution.
Don't use it though. Different people have different screen sizes and it is best to try let your design flow to match it.
Besides, 1024x768 is the minimum screen size you should be designing for today.
I think for the most part it means "minimum resolution the monitor should be set to". At least thats what i've always meant when i would put that in :).
I means the minimum monitor resolution setup. But i can give you a good sugestion try to build your app as free as you can I usualy use a lot of zoom in web and some apps don't like it.