WM Screen Size

I´m developing an app for use on HTC HD2 cell phone with WM 6.5, VS 2008 and C#.

The phone resolution is 480 x 588 pixels and the Visual Studio Forms is 240 x 268.

If I change the forms dimension the result is not the expected because the form size going to big.

Is there a way to I achieve the correct resolution for this phone in design time on VS 2008 ?

If I publish this app to the HTC device the objects aren´t displayed well. And If I change the size of the forms manually in VS 2008 I can display the content in right way on the phone.

But I think this aproach isn´t the corret way change the forms size based on the phone size. Is there a way to do this ?


 VS 2008 Forms size with the HTC HD2 Resolution
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You need to manage the size and position of your forms in code for all the resolutions.
hjgodeTier 3 Senior Technical Support EngineerCommented:

If you have installed WM6.5 SDK and you set Windows Mobile 6.5 as target platform in your visual studio 2008 project, you can set the form factor in the form properties of your dialogs.
There you have to set the form factor size to 480x588.

But it is always good to not rely on a specific screen size for mobile development and use a layout manager to layout your form. I have published an article on layout managers for compact framework on my blog at http://www.hjgode.de/wp/2010/07/17/mobile-development-using-layout-managers/ and a copy of an external site at http://www.hjgode.de/wp/all-posts-list/layout-manager-in-csharp-copy/


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Smartphone Programming

From novice to tech pro — start learning today.