Article ID: 210590 - View products that this article applies to.
This article was previously published under Q210590
Advanced: Requires expert coding, interoperability, and multiuser skills.
This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).
Because Microsoft Access stores dimension/location properties as twips, in certain cases you may have to convert twips to pixels, such as when you call a Windows API function. This article shows you how to do this.
Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.
You can use the following ConvertTwipsToPixels() function to convert twips to pixels. Note that pixels are not always square (the height and width are not the same); therefore, it is necessary to pass in the desired "direction" to use (horizontal or vertical).