VS2005: Setting Screen Resolution Awareness?

R

rpatel4

I've got a C#, Visual Studio 2005 application targetted to the Windows
Mobile 5.0 Pocket PC Device.

When the app is loaded on devices with different orientation, It gives
me the correct orientation when I examine the screen's size (either
320x240 or 240x320).

However, when I load this on a VGA device, the app remains at QVGA
resolution (with pixel doubling occuring).

I've tried to search and haven't found an answer. I want my app to be
aware of the VGA resolution so I can handle things differently

In VS2003, it seems that you run a res2exe after the build.

Based on the reading I've found, VS2005 has built in support to set the
app to resolution aware, but I can't seem to be able to do it. I've
tried changing a Form's target device in the designer to Pocket PC VGA,
and the designer is now behaving well, but during runtime, I'm only
getting 320x240. And I'm not finding any setting in the project or
solution's properties.

So the question is, how do I modify my solution/project/form so that at
runtime, when I query a form's size, or look at
System.Windows.Forms.Screen.PrimaryScreen.Bounds, or paint items, it
uses the actual VGA (or QVGA) resolution, and not a pixel doubling from
QVGA to VGA?
 
R

rpatel4

Forgot to add, I'm using Compact Framework 1.0 SP3, if that makes a
difference in getting the res awareness set?
 
R

rpatel4

Forgot to add, I'm using Compact Framework 1.0 SP3, if that makes a
difference in getting the res awareness set?
 
R

RP

I was able to figure it out
1. Download & Install the "Developer Resources for Windows Mobile 2003
Second Edition" from Microsoft.
2. Find the "hidpi.res" file from the above.
3. Copy file out to wherever you want
4. Add the file as a Resource -- Project
Properties-->Application-->Resource File

Seems to work. If anyone has a better/easier way of doing it directly
in Studio without outside files that would be great.
 

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