p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > ASP Pro Code Clinic
I forgot my password Register Now
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 11th, 2003, 05:38 AM
Authorized User
Points: 153, Level: 3
Points: 153, Level: 3 Points: 153, Level: 3 Points: 153, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: , , Netherlands.
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
  #2 (permalink)  
Old December 11th, 2003, 06:03 AM
Imar's Avatar
Wrox Author
Points: 33,170, Level: 79
Points: 33,170, Level: 79 Points: 33,170, Level: 79 Points: 33,170, Level: 79
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 10,161
Thanks: 7
Thanked 188 Times in 186 Posts
Default

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
  #3 (permalink)  
Old December 11th, 2003, 06:04 AM
Authorized User
Points: 153, Level: 3
Points: 153, Level: 3 Points: 153, Level: 3 Points: 153, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: , , Netherlands.
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
  #4 (permalink)  
Old December 11th, 2003, 06:16 AM
Imar's Avatar
Wrox Author
Points: 33,170, Level: 79
Points: 33,170, Level: 79 Points: 33,170, Level: 79 Points: 33,170, Level: 79
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 10,161
Thanks: 7
Thanked 188 Times in 186 Posts
Default

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
  #5 (permalink)  
Old December 11th, 2003, 06:21 AM
Authorized User
Points: 153, Level: 3
Points: 153, Level: 3 Points: 153, Level: 3 Points: 153, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: , , Netherlands.
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between win32 API and FCL adie BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6 0 July 26th, 2007 06:56 PM
How to read C# IntPtr struct in Win32 API Lookie VB How-To 1 February 24th, 2005 07:29 PM
Win32 API Programming visit_anand_it Visual C++ 2 September 8th, 2004 12:46 AM
how to use win32 API? csc820203 C# 1 June 23rd, 2004 03:12 AM
Need help in writing a C program using win32 API rameshbabumv C++ Programming 0 March 10th, 2004 05:46 AM



All times are GMT -4. The time now is 07:43 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc