Can screen resolution be detected with server code (in Page_Load) ?
I have tried this:
public int Width =
Convert.ToInt32 (System.Windows .Forms.Screen.P rimaryScreen.Wo rkingArea.Width );
public int Height =
Convert.ToInt32 (System.Windows .Forms.Screen.P rimaryScreen.Wo rkingArea.Heigh t);
and sure enough, I get a couple of numbers; Width=1024 and Height=738 when
running at 1024x768 - but I also get the same numbers when running at
1280x1024 (?) - so I just don't know what I'm actually reading here.
The idea is to rescale some controls to make the best out of the actual
resolution, and if I could do this server side I would be happy. But if
client script is the only way, well then that's the way.
Anyone with an opinion on this?
Bjorn
I have tried this:
public int Width =
Convert.ToInt32 (System.Windows .Forms.Screen.P rimaryScreen.Wo rkingArea.Width );
public int Height =
Convert.ToInt32 (System.Windows .Forms.Screen.P rimaryScreen.Wo rkingArea.Heigh t);
and sure enough, I get a couple of numbers; Width=1024 and Height=738 when
running at 1024x768 - but I also get the same numbers when running at
1280x1024 (?) - so I just don't know what I'm actually reading here.
The idea is to rescale some controls to make the best out of the actual
resolution, and if I could do this server side I would be happy. But if
client script is the only way, well then that's the way.
Anyone with an opinion on this?
Bjorn
Comment