Solved

Auto Resize web form to fit the screen size

Posted on 2007-03-22
4
2,757 Views
Last Modified: 2011-09-20
I want a script to be included in all web pages that will automatically Adjust / Resize a web form height and width to fit the screen size..
i'm using ASP.NET 2.0 with C#
0
Comment
Question by:Collindsouza
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 11

Accepted Solution

by:
ethoths earned 500 total points
ID: 18771012
Stick this in your master page.
Note that it's not really necessary to do this on every page though. A better way would be to do it on your entry page and then detect the users attempt to resize / move the page.

<script for="window" event="onload">
  window.moveTo(0,0);
  window.resizeTo(screen.availWidth,screen.availHeight);
</script>
0
 
LVL 5

Author Comment

by:Collindsouza
ID: 18772817
Thanks for your help...
Just one more thing..
How do i enable scroll bar if the window is resized by the user??
0
 
LVL 11

Expert Comment

by:ethoths
ID: 18772938
BNot sure what you mean. The scrolbar is automatic and will appear if needed. This is unless you opened the window as js window.open and explicitly set scronlebars to none. If so just set them to auto. Full window.open syntax can be found here

http://www.javascript-coder.com/window-popup/javascript-window-open.phtml
0
 
LVL 5

Author Comment

by:Collindsouza
ID: 18772974
sorry...

The scroll bar is automatic ..

many thanks for your help...

Collin
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question