Does RectangleToScreen also convert Size part?

G

Guest

Hi all!

I'm using Compact .NET Framework 2.0 SP1 Beta 1 and an iPAQ HP hx4700 with
Windows Moibile 5.0 PC together with Visual Studio 2005.

When I debug my .NET application I can't see that the Size part of my
Rectangle is converted to screen cordinates when Size values are Width = 5
and Height = 45.

Since my device, HP iPAQ hx4700, has DPI X and Y of 192 pixels and a screen
resolution is 480x640, I need to scale all graphical objects so they appear
correctly on my HP device, as they do in the Windows Mobile 5.0 Pocket PC
Emulator!

What is the preferred way of having my application scale correctly with
different resolutions? I use Rectangles to draw vertical progressbars, that
are not possible to do in Compact .NET Framework 2.0!!!

/Thanks
 
S

Simon Hart

If you are drawing using GDI, then you will have to calculate the factor
yourself in code depending on the resolution. Unfortionately there is no
automatic way of doing this.

Simon.
 
G

Guest

Thanks for the answer.
One can not help to wonder, whats the purpose of this method then,
since only the Point part are converted. There exist one PointToScreen to do
just that!!
 
S

Simon Hart

Those methods just take into consideration the actual visible drawing area.
You still have to do the calculation for different resolutions.

Regards
Simon.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top