What are the exact dimensions for a Windows application icon - c#

There are different dimensions for taskbar(big icons, small), desktop, start menu, etc. What are all dimensions one needs for a Windows application? And is there a way to put them all into a single file?
I have already designed the icon in Photoshop.

Well, the desktop alone can use almost any standard (Joey named most, if not all, of them) size.
I find it works well to combine 16x16, 32x32, 48x48, and 256x256 (and maybe more sizes) into one .ico file. I use IcoFx, and it is super easy to create multi-size icons from one 256x256 image.

Icon files (.ico) can contain variaous sizes. Common sizes for icons on Windows are:
16×16 (e.g. in the notification area of the taskbar or in default settings for the system menu of an application). This often shows a different icon than the other sizes due to the small area, e.g. perspective is often left out (which is in the recommendations for icons as well, if I remember correctly).
24×24
32×32 (e.g. in the taskbar unless small icons are configured for it)
48×48
64×64
128×128
256×256
If a size is missing then a larger one will be used to downsample the image or, if no larger one is present, a smaller one will be upsampled (with quality loss). The different sizes are thus not particular important except to provide the artist some control over the icon in standard sizes (it's not uncommon to have the icon in a vector format and edit the rasterised version in various sizes so they look good in all of them).
The uses mentioned above are approximate and depend on various things, e.g. the user's DPI setting.

Related

Control Application Flow According to Screen Size

I am new to windows phone development. I have an issue regarding screen size variation and I successfully handle the UI according to resolution but problem is that I don't have any idea how to change the size of text for different resolutions, use different images for different resolution etc.
As in Android we have different asset folders. We just put our data in folders and it will use best option automatically according to the screen size . I did a lot of Googling but did not find a suitable solution for it. Any idea how I can achieve this?
You shouldn't pay attention to screen sizes at all, everything is scaled up automatically and applications look good on smaller and larger screens.
If you want to customize the design for your screen depending on the screen size, DPI or something else, take a look at the proposed solution here: http://developer.nokia.com/community/wiki/Advanced_Techniques_for_Big_UI.

NotifyIcon and High DPI Displays

Following this guide: http://www.hhhh.org/cloister/csharp/icons/ I was able to get my NotifyIcon to look the way it should because Windows decides to use the 32x32 icon and scale it to a 16x16 instead of just using the 16x16 icon.
That being said, I have an .ico file with the following resolutions:
256x256x32
64x64x32
48x48x32
32x32x32
16x16x32
48x48x8
32x32x8
16x16x8
32x32x4
16x16x4
However, when I increase the DPI settings on my display, the icon displayed in the NotifyIcon is a higher resolution version, with more embellishments that end up looking terrible scaled to the size of the NotifyIcon. What size icon is it taking and scaling now? Would I be better off just creating a simple icon of every size specifically for the NotifyIcon?
The icons displayed in the notification area are small icons. That is their size is given by the SM_CXSMICON system metric. Find out that size and supply an icon of the exact dimensions to avoid aliasing. If you have not got one the exact size to hand, probably the best you can do is to draw the closest smaller sized icon onto the middle of an empty transparent canvas, and use that.
You may not be able to do this using the managed NotifyIcon wrapper. I expect that you don't get enough control. The procedure I describe really requires you to be able to call Shell_NotifyIcon, the native API, and pass an HICON.
This page http://msdn.microsoft.com/en-us/library/bb773352(VS.85).aspx gives an example of how to pass the correct icon for the correct DPI. It uses LoadIconMetric, which probably isn't directly available in c#, but it would be simple to marshal one.
Check my answer here: notifyicon image looks terrible once image ends up in system tray
Basically, you need to explicitly declare which size to use at runtime, and to declare your app as DPI-Aware.

Image Size for different Screen Resolutions in Windows Store app

I am Developing a Windows Store application. There are seven resolutions in Windows. I want to set different image sizes for different resolutions. Can any one know what are the image sizes for Windows Simulator Resolutions.
These are the resolutions Simulator provide:
10.6" 1024*768,
10.6" 1366*768,
10.6" 1920*1080,
10.6" 2560*1440,
12" 1280*800,
23" 1920*1080,
27" 2560*1440,
My question is Image sizes for these resolutions regarding Background Image, Launch image(splash screen). I want to Select image based on Screen Size. Guide me the what are the image sizes regarding of Screen size.
I searched through out in internet. Help me regarding this.
Depending of the kind of application that you are dealing with, the best option may be to scale or to adjust the image size.
Take a look a this resource Guidelines for scaling to screens (Windows Store apps) it will provide a complete picture of this very important topic.
In the same reference guide you have Guidelines for scaling to pixel density (Windows Store apps)
I truly recommend to read the MSDN reference to Windows 8 apps. It's very well documented and has tons of examples.
It's worth mentioning that the system can automatically swap images for you when the screen resolution goes above 140% and 180% of 1366 x 768. To take advantage of this "auto swapping" simply include three versions of your image:
MyImage-100.jpg
MyImage-140.jpg
MyImage-180.jpg
Then, when you reference the image in your application just reference it as MyImage.jpg. The system will take care of the rest.
If you need to swap images out at resolution thresholds other than 140% and 180% you will need to write your own custom code.
In addition to the great resources that Agustin has provided, please note that the launch image/splash screen must always be 620 x 300 pixels, regardless of your screen size/resolution. You can find this in your Package.appxmanifest file under the "Application UI" tab, at the bottom.

Why does windows form resize on a different computer

I have a form that I have sized to what I wanted, it has a few panels, some buttons and some labels on it but when I open it on a different computer, it is resized and it is larger. I am using visual studio 2008. I know this is very little detail but I thought maybe someone knows of a known issue or some troubleshooting steps that I can take.
Possible reasons for this are different screen resolution and different DPI.
Several possible reasons. First and foremost is the form's AutoScaleMode property. The default, Font, ensures that both the font and the controls get resized to leave enough room for any displayed text. Text size is measured in points, 1/72 of an inch. If you run your program on a machine with a larger dots-per-inch setting for the video adapter, the fonts grow accordingly and need more pixels. That needs the controls to be bigger as well to prevent clipping the text.
Another reason is user preferences for border width (Aero) and caption bar height. A form is sized based on its designed ClientSize, the actual Size at runtime will be determined by adding those preferences to the design size. That's very rarely a problem.
May be the computers have different screen resolution and that's why it appears small in one and large on the other computer
Diffeent resolutions, different browsers, different versions. If you want o keep this from happening, you must specify their width and height.

Windows 7 icon sizing problems

I'm trying to create an application icon. I took a bunch of created *.ico files (one for each size) and combined them into a single *.ico file. I can see them all fine. I have 16x16, 32x32, 48x48, 64x64, and 128x128 icons (all 32bit w/ transparency).
However, when I build my app (a standard Windows Forms app written in C#) and look at the icon in Windows explorer, it looks fine at the first few sizes (up to 48x48 I think.. "Medium"), but if I use the "Large" or "Extra Large" display modes in Windows Explorer, I just see the 48x48 (I think) icon in an ever larger box.
How can I get Windows Explorer to recognize the larger icons? What am I doing wrong? Has anyone seen this issue before, and point me in the correct direction? I'm assuming there's a problem with the way the *.ico file is built, or the formats... but I can't find any hints anywhere.
As far as I understand it, once you get above a certain size (and it may well be 48x48), Explorer will go looking for a 256x256 icon, and scale it to the desired size.
128x128 is not a standard icon size, and Explorer may not bother looking for it. You can show icons at up to 256x256 in Explorer ("Extra Large icons"), though you can do sizes in between. If you size your icons to, say, 192x192, then it's going to look better to take a large image and scale it down, rather than to take a small image and scale it up -- so you're better off adding a 256x256 image anyway, rather than a 128x128.

Categories