473,791 Members | 2,807 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Page & Control Scaling?

Hello Everyone!

I am curious if anyone has done anything so automate the scaling of controls
based on screen resolution. In my case I have a minimum screen res of
1024x768 for my page size, which I designed to, but I know a lot of people
are now using 1280+ and am looking for any examples of ways to in code behind
do something like this.

if (screen.width < 1024)
{
string controlwidth = screen.width.va lue / 30%
contol1.width = controlwidth
}

I know this is very crude but has anyone seen something that can do this on
the web? I have a couple of controls and tables that I am using that have
assigned sizes that I would like to change on the fly if possible!

--
D @ premierdata
Nov 19 '05 #1
1 1239
Hi Dewright,

As for the auto adjusting Control's size according to clientside's Screen
Size question, here are some of my suggetions:

For WebApplication, client user visit the application through webbrowser
and most browsers provide some interfaces for retrieving clientside
environment info. And screenSize is one of them, however since this is a
clientside setting ,we need at least one round trip to the clientside to
gather this info. Also, I've found that we've discussed this question in a
former thread, and I've mentioend a means that use a central information
gather page(or an httphandler), all the session that dosn't contains clietn
screen size info will be redirected to that page/handler first. How do you
think of it?

#Control Scaling???
http://groups-beta.google.com/groups...8lBTw1J7xZp3d4
p9GYnQB_MuUCIzG _J0TEfwmEXeyg

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

179
44455
by: SoloCDM | last post by:
How do I keep my entire web page at a fixed width? ********************************************************************* Signed, SoloCDM
2
2357
by: Christopher Ambler | last post by:
I'm wondering if there's a solution here - I have an ASPX page with a sole purpose of scaling an image. The ASPX page contains a single line with the codebehind tag, and the .cs file contains the code to read an image, use GDI+ to scale it to a reasonable size, and emit the image directly (setting content-type on the response and spitting out the bytes for the image). What I'd love to do would be to eliminate the ASPX page and be able...
1
2117
by: AndrewF | last post by:
Hi there, I have racked my brains for days on this and can't seem to find a solution. I have a form which is dynamically creating some text boxes on it. The text boxes are single line ones. At the moment I am creating them and not specifying either width or column size, preferring to use CSS to style them so the designers can
7
2406
by: GaryDean | last post by:
In my old 1.1 apps the default was MS_POSITIONING="GridLayout" and Textboxes and labels and such always had POSITION: absolute; and I never had any distortion when the page was rendered. Life was good. now in 2.0 I'm using the default placeholder and putting a table in the placeholder and putting controls in the cells in the table. "the way it is supposed to be done" I have a textbox in a table that is defined as follows... <td...
3
4524
by: Joseph Gruber | last post by:
Hi all -- I have two questions. First, I'm adding a control to my form at runtime and the control/form seems to ignore the anchor property of the runtime control. Any idea how I can get a runtime control to anchor properly? Second -- the program I'm writting is supposed to look like a dos application (long story). When the application is "Normal" aka a small window then everything looks great. But when I resize the window to...
0
2330
by: CO2 | last post by:
And here is my second problem while converting webpages to pdf: Scaling large images to fit to the page. I was using the follwing code to scale the images: <fo:external-graphic src="{@src}" content-width="scale-to-fit" content- height="100%" width="100%" scaling="uniform"> This does indeed perfectly fit the large images into the pages but it also leads to small images taking up the whole space to their right.
0
1438
by: igalep132 | last post by:
Hey all, I was trying to resize control size to the form size. I'm changing my form size according to current Screen Size by using Screen.PrimaryScreen.WorkingArea; and then I'm making a resizing to my form. but the main problem is how to resize controls which are embedded to the form ? after googeling and trying some kind of things, i got that the main problem of control resizing is control's font scaling. any idea how to scale the font...
4
3083
by: =?Utf-8?B?R2lkaQ==?= | last post by:
Hi, I've a document which i'm creating and printing. i want to print 2 copies: 1. regular A4 copy 2. 70% of A4 size (like in copy machine, where you can choose the size of copy). how can i do that?
9
4515
by: raylopez99 | last post by:
After refering to the below thread, I take it for C# Forms 2.0, there a way to draw a 1 pixel by 1 pixel rectangle, which I was able to do just now successfully. http://groups.google.com/group/microsoft.public.dotnet.languages.csharp/browse_thread/thread/59ed00adf5eef2d0/444f363036fc64f2?hl=en&lnk=gst&q=paint+a+pixel#444f363036fc64f2 But now the question is: has anybody ever done a 'scaling problem' for a grid where you are 'zooming...
0
9669
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9515
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10207
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7537
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6776
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5558
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4109
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3713
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2913
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.