Re: How to determine PDA resolution (DPI) in .Net compact framewor
- From: "DJMatty" <matt@xxxxxxxxxxxxxxx>
- Date: 24 Jul 2006 07:40:50 -0700
Hi
I've seen that people have replied, but this is something that we have
had to do in our unmanaged app recently, and to get the screen
dimensions and DPI we use these calls:
int iHeight = GetSystemMetrics(SM_CYSCREEN);
int iWidth = GetSystemMetrics(SM_CXSCREEN);
int iPixels = GetDeviceCaps( GetDC()->m_hDC, LOGPIXELSX );
if iPixels is 96 it's low dpi...
HTH
Matt
Santosh wrote:
Just a quick question. I assume that hidpi.res is my resource file containing
all my hidpi icons/images. Where can i get tool RES2EXE for Visual Studio
2005?
Thanks,
-Santosh
"Santosh" wrote:
Thanks a lot Simon!
I will talk to product manager to move CF2.0
Cheers,
-Santosh
"Simon Hart" wrote:
It's messy, but see if any of these links help:
Managed:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnppcgen/html/developing_orientation_and_resolution_aware_apps.asp
Unmanaged:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnppcgen/html/dpi_awareness.asp
http://blogs.msdn.com/windowsmobile/archive/2004/04/03/107203.aspx
Why can't you auto update the CF2 as well as your app? It is around 5mb in
size.
Regards
Simon.
"Santosh" <Santosh@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:23876DA6-6F66-4160-B640-E81558AF089D@xxxxxxxxxxxxxxxx
Forget to mention that I am using VS 2005.
Thanks
"Santosh" wrote:
Thanks Simon. The issue is that Windows Mobile 5.0 has .Net CF1.0 in ROM
not
the .NetCF2.0. To distribute .NetCF2.0 application we have to install
.Net CF
2.0 cab file that my product team don't want since we will do GPRS update
and
that will cost to customer.
Can you please help me what I have to do so that .Net CF1.0 will be DPI
aware?
Thanks a lot
Cheers,
-Santosh
"Simon Hart" wrote:
Santosh,
Implementing your application as DPI aware on CF 1.0 is very difficult
(this
means targetting QVGA and VGA devices) and in my opionion not worth the
effort.
You should try upgrading to CF 2.0, it handles DPI-aware automatically
and
enables you to get runtime DPI easily so you can draw different
bitmaps,
icons etc at runtime.
Regards
Simon.
"Santosh" <Santosh@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:16216F24-517B-4E8D-85BA-BCA19AEA0FA1@xxxxxxxxxxxxxxxx
Thanks a lot Peter pointing me there but sorry to mention that I am
developing application using .NetCF 1.0 and APIs is not supported
there.
I read MSDN article that .Net compact framework automatically resize
the
controls on .NET Compact Framework forms to take advantage of
high-dpi
displays.
My requiremnt is that I want this default behaviour but I am using a
bitmap
for my application home screen. I want to display different bitmap
for
resolutions '240 X 320' and '480 X 640'. What I am thinking that if I
can
determine the resolution at run time then I can read corresponding
bitmap
from resource file. Please correct me if my thinking is going wrong
somewhere.
I am just strugging for Win32API or .Net CF1.0 API that gives me
resolution
at run time.
Can you please help me out?
Thanks,
-Santosh
"Peter Foot [MVP]" wrote:
System.Windows.Forms.Screen.PrimaryScreen.WorkingArea will return
the
screen
area. However if your app is not marked as hi-dpi aware this will
return
240x320 even on a hi-dpi device because it will function in
compatibility
mode (using pixel doubling)
Peter
--
Peter Foot
Device Application Developer MVP
www.peterfoot.net | www.inthehand.com
"Santosh" <Santosh@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:85BCCA17-D73B-4F4A-A05F-13FE39E1E6E5@xxxxxxxxxxxxxxxx
Thanks Paul. Is any win32 APIs through which we can know screen
resolution
I
mean wheather PDA is 240X320 or 480X640?
Thanks,
-Santosh
"Paul Edwards" wrote:
Santosh,
You may want to take a look at the recently released Mobile
Client
Software
Factory from the Patterns and Practices group. This has a
Resolution
aware
component you could either use or understand how it is done.
Here's the link -
http://www.gotdotnet.com/codegallery/codegallery.aspx?id=5bef2b5f-476a-488c-8d55-9d41666a36f3
Thanks,
Paul
"Santosh" <Santosh@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:8D2D33D7-F474-4FDC-98F3-EB45E9CFF29B@xxxxxxxxxxxxxxxx
Hi Friends,
Can anybody help me how to determine resolution
of
pc
5.0 with a program developed in .Net compact framework?
Thanks,
-Santosh
.
- Follow-Ups:
- References:
- Re: How to determine PDA resolution (DPI) in .Net compact framework 1.
- From: Paul Edwards
- Re: How to determine PDA resolution (DPI) in .Net compact framewor
- From: Peter Foot [MVP]
- Re: How to determine PDA resolution (DPI) in .Net compact framewor
- From: Santosh
- Re: How to determine PDA resolution (DPI) in .Net compact framewor
- From: Simon Hart
- Re: How to determine PDA resolution (DPI) in .Net compact framewor
- From: Santosh
- Re: How to determine PDA resolution (DPI) in .Net compact framewor
- From: Santosh
- Re: How to determine PDA resolution (DPI) in .Net compact framewor
- From: Simon Hart
- Re: How to determine PDA resolution (DPI) in .Net compact framewor
- From: Santosh
- Re: How to determine PDA resolution (DPI) in .Net compact framewor
- From: Santosh
- Re: How to determine PDA resolution (DPI) in .Net compact framework 1.
- Prev by Date: Re: Cross-Thread Issue with HTTPWebRequest.EndGetResponse()
- Next by Date: Re: PDA/SmartPhone Licence File and Device ID
- Previous by thread: Re: How to determine PDA resolution (DPI) in .Net compact framewor
- Next by thread: Re: How to determine PDA resolution (DPI) in .Net compact framewor
- Index(es):
Relevant Pages
|