views:

15

answers:

1

Hi,

I have serious problems to detect screen resolution under vista64. I have 2 methods using C# to find the resolution backside of a webpage. Client side resolution using javascripting is fine but backside nothing is correct.

1/ int deskWidth = SystemInformation.PrimaryMonitorSize.Width; return 1024.

2/IntPtr hdcSrc = User32.GetDesktopWindow(); int width = GetDeviceCaps(hdcSrc, HORZRES); return 1024

After many changes is screen res. these methods are always returning the same value 1024. In the past these methods worked fine but windows update is here.

Can someone help me to fix this issue or sugest another way to get the resolution that works.

Many thanks for your answers.

A: 

It is not possible to detect the browser's screen resolution directly on the server.

SLaks
Not the browser, but the screen resolution!
@User: What? You can't get any info about the client system (other than the User-Agent) on the server. Do you mean the server's screen resolution?
SLaks