Delphi Function to Display Number of Bytes as Windows Does
问题 This is a simple one (I think). Is there a system built in function, or a function that someone has created that can be called from Delphi, that will display a number of bytes (e.g. a filesize), the way Windows displays in a file's Properties box? e.g. This is how Windows property box displays various sizes: 539 bytes (539 bytes) 35.1 KB (35,974 bytes) 317 MB (332,531,365 bytes) 2.07 GB (2,224,617,077 bytes) The display is smart about using bytes, KB, MB or GB, and shows only 3 significant