 |
| ASP Pro Code Clinic As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ASP Pro Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

December 11th, 2003, 05:38 AM
|
|
Authorized User
|
|
Join Date: Jun 2003
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Change resolution by accessing Win32 API functions
Hello,
As a test i want to change the users screen resolution to 1024x768 when they load my webpage. I wanna find out if that ain't to frustrating for the user, cause if it's not that would save me a lot of time with not making a lot of pages in different resolutions.
I found the code how to do this from within .Net, but i'm using ASP. The code i found uses API functions but i don't know if it's possible to access these from within ASP too. And even if it's possible i don't have a clue how to do this. The link where i found the .Net code: http://www.omniscium.com/index.asp?p...reenResolution Is this possible?
Has anybody else tried something like this before or do u think this isn't gonna work at all?
Greetz,
Harold
|
|

December 11th, 2003, 06:03 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Let's hope this is NEVER going to be possible from within a web page.
What's next? Change my desktop background to your company logo? Change the colors and theme? Upgrade my Video Card drivers?
Yes, this would be frustrating. Not only that, you could cause problems as well. What about someone does a 1600x1200 resolution change on a card that supports up to 1024x768?? Ooops.
Bottom line: you can't do this and I am glad you can't. The only thing you could is change the browser window to a more reasonable size. You can use JavaScript to resize the current window or to influence the size of new windows you open by code.
However, IMO, what you really should do is design websites that run on multiple screens without problems. Spend some time looking at CSS, DHTML, Liquid Tables (an HTML technique to make tables auto stretch) so your pages look good, no matter the computer your end-user is using.
Groeten,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|

December 11th, 2003, 06:04 AM
|
|
Authorized User
|
|
Join Date: Jun 2003
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
well well already one frustrated user  . I wanted to do it this way only inside the company where i know al the systems can handle this resolution. But almost all users work on a 800x600 resolution (which sucks). and yes i know u are gonna say now that i should develop it mainly for 800x600 but that's not the point yet
i know about stretching tables and so on, but u would still have to edit a handfull of static pages and because i'm lazy (and don't like 'creating' the same page twice) i was looking for another solution.
[offtopic]
don't u have a job? cause u are answering almost all my questions very very soon (which i greatly appreciate offcourse :D)
[/offtopic]
|
|

December 11th, 2003, 06:16 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
I do have a job, but you know what they say: "If you want something done fast, ask a busy guy to do it for you" ;)
There's 24 hours in a day; I spend about half an hour max answering questions on these forums. That leaves roughly another 18 hours for a job, although I think 8 to 9 hours is more than enough.
Even inside a company Intranet, you can't and shouldn't mess with screen resolution from ASP pages. You'll get frustrated users and you'll break things (literally). Talk to your boss and tell him to set the company standard to 1024x768 or higher....
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|

December 11th, 2003, 06:21 AM
|
|
Authorized User
|
|
Join Date: Jun 2003
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
quote:Originally posted by Imar
Even inside a company Intranet, you can't and shouldn't mess with screen resolution from ASP pages. You'll get frustrated users and you'll break things (literally). Talk to your boss and tell him to set the company standard to 1024x768 or higher....
|
lol the boss agrees with me (about the screenresolution that is) but those users keep complaining about how little everything gets at that resolution. But soon we are gonna migrate to a new OS and guess who's going to create the image (including a nice screenresolution  )
Users can be very frustrating too...sighhhh...
but thanks again for helping!
Harold
|
|
 |