I understand that there is no FIXED value and that it is monitor and resolution dependent. That, in fact, is my problem. I want the rectangle that I draw (using GDI+ in VB.NET) to be actual size no matter what the resolution or monitor size is. I need a way to calculate what the size SHOULD be in pixels based on the actual size in Millimeters.
The graphics class will let me change the unit to Millimeters and then when I draw the rectangle it is the right size. The problem is then I need to center it in a Panel (a VB component). The panel is defined in Pixels, so I cant figure out where the top left corner of the rectangle should be.
The top-left corner is based on the following equation:
PanelWidth / 2 - RectangleWidth / 2 and
PanelHeight / 2 - RectangleHeight / 2.
This will give me the left and top points, respectively. The problem is that the rectangle is in Millimeters and the Panel is in Pixels, so the math wont work. Therefore I need to convert one or the other to the same unit of measure so that I can make the above equation work.
I should note that this needs to be dynamic because this application could be run on various monitors and resolutions.
Any suggestions?
Eric