Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Distributed Applications / May 2006

Tip: Looking for answers? Try searching our database.

Detecting Screen Resolution

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steve H - 10 May 2006 03:26 GMT
Hello,

I've got a .NET Web application (Visual Studio 2003 & .NET FW 1.1), and when
running my app from Visual Studio it detects my screen resolution properly,
but when I deploy it to the web-server machine, it always detects it as 1280
x 1024.

Is there something that needs to be entered in the config or a file uploaded
with the pages/code to the webserver to make this work?

I'm using:

System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height.ToString()
System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width.ToString()
Michael Nemtsev - 10 May 2006 06:08 GMT
Hello Steve,

WS detect the screen resolution on the server side, that's why on your local
machine it works properly.
When you install you WS to the server machine it returns you the resolution
of the server, not yours.
Use javaScript screen.width screen.height to detect client resolution

SS> I've got a .NET Web application (Visual Studio 2003 & .NET FW 1.1),
SS> and when running my app from Visual Studio it detects my screen
SS> resolution properly, but when I deploy it to the web-server machine,
SS> it always detects it as 1280 x 1024.

---
WBR,
Michael  Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.