Avonelle's Tech Blog

Go Back

Thank goodness for AutoScaleMode and AutoScaleDimensions in the .NET CF

Last week one of my customers contacted me with a problem. Their customer had purchased several HTC Touch Pro devices for use with the software I built for them. Unfortunately, the software was practically unusable on the device because it squashed everything into the upper left hand corner of the phone.

I feared that this was going to present a big problem. Fortunately, fixing this issue wasn’t bad at all. Mostly what I had to change was making sure that the AutoScaleDimensions and AutoScaleMode for the forms were set properly. Something of note: the linked article indicates that the designer automatically adds a statement setting these values, but several of my forms did not have the settings. My guess is that some of these forms were created with an earlier version that didn’t support it.

I had a few places where I had some custom scrolling code, but for the most part this was a quick fix. I was able to give the customer a quick turn-around and their customer is pleased with the results. Plus, while the app was created for square screen device, many places now utilize the complete screen if resolution is more rectangular.

Posted by Avonelle on Wednesday, March 04, 2009.

Facebook Twitter