I am making a C# program with a listview and in my PC and netbook the columns sizes are perfect, but when I run the program in my friends computer the column’s size appear to be smaller, the text is being cut, for example, if my column shows “Hello Stackoverflow” in my PC, in my friend’s PC it shows “Hello Stac…” . The column size is set in the code, and he is not resizing…how may this be possible? We are using the same screen resoluiton (1080p), and even if he changes the resolution to something bigger (800×600), the column text is still cut out, just the window in general is bigger…may it be a default font from windows making all this problem??
Thank you all!!
I am making a C# program with a listview and in my PC and
Share
This may be a matter of the DPI setting. Your friend may have “large fonts” enabled. Setting fixed column widths, you need to take the DPI setting into account. 100 pixels are always 100 pixels, but changing the DPI setting makes 8pt font be larger on your friends machine than on yours.
You can easily compute this:
with
Desired Widthbeing the number of pixels you want the column to be wide andDPIbeing the horizontal DPI of the current machine.