473,385 Members | 1,474 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Rendering issue: AutoScrollMinSize and AutoScale

Hi,

I'm running into a scaling issue.
I'm having a simple form. I have some control in that form (2 group boxes,
one dock to the left , the other set to fill, with some misc. controls in
them).
I set the AutoScroll = true on the form and set the AutoScrollMinSize to 700
(which is good at design time).
On XP system, the default font is set to Microsoft Sans Serif, 8.25 point),
everything looks good.
Now if i run this on a different os (say a chinese os, the font used is
different and i'm getting a font of size 9 pt).
Then it looks like the AutoScale is not doing its job properly as it does
not change that 700 value.

Ami i missing something? Should i avoid using the AutoScrolMinSize?
Any way to set that value properly at runtime?

I appreciate any comments on that one

Thanks for your help

--
Nick
Dec 7 '07 #1
2 3997
On Fri, 07 Dec 2007 02:46:00 -0800, Nick <Ni**@discussions.microsoft.com>
wrote:
[...]
Then it looks like the AutoScale is not doing its job properly as it does
not change that 700 value.

Ami i missing something? Should i avoid using the AutoScrolMinSize?
Any way to set that value properly at runtime?
I'm not aware of any reason to think that the auto-scaling would affect
your scrollbar ranges. While you happen to be using the scrollbar values
here to represent values tied to the dimensions of the form, there's no
requirement that one do that and so always auto-scaling the scroll bar
values according to the form size would be wrong.

Now, that said...

The current approved mechanism for auto-scaling is to use the
AutoScaleMode and AutoScaleDimensions properties. Along with these is an
AutoScaleFactor that you can use to determine the current scaling, and
with that you can apply a correction yourself to the scrollbar range.

If you really insist on using the deprecated AutoScale property, you can
retrieve the base size through AutoScaleBaseSize and then call the
GetAutoScaleSize(). You can then calculate a ratio yourself from that,
and which you can apply to your scrollbar ranges.

Pete
Dec 7 '07 #2
Hi Peter,

Thanks a lot for your reply.
I'm not using the deprecated AutoScale mecanism, but the result is the same.
What i would like to do is to get that ScaleFactor that has been used to
re-scale my AutoScrollMinSize value, but i'm not sure how to get that
information.
It looks like the scaling process happen before the constructor of the Form.
This means that in the constructor, the value of the AutoScaleFactor is 1 for
both width and height. Once the scale process is done, the AutoScaleFacor is
resseted to avoid further rescale in case the Scale method is called at
runtime. Value of properties CurrentAutoScaleDimension and AutoScaleDimension
are identical (because the scale process is done)

Would you know how i can get the scaling factor used by AutoScale ?

Does that make sense that the AutoScrollMinSize is not rescaled or is this a
..NET bug?

Let me know what you think

Thanks and have a great day

--
Nick
"Peter Duniho" wrote:
On Fri, 07 Dec 2007 02:46:00 -0800, Nick <Ni**@discussions.microsoft.com>
wrote:
[...]
Then it looks like the AutoScale is not doing its job properly as it does
not change that 700 value.

Ami i missing something? Should i avoid using the AutoScrolMinSize?
Any way to set that value properly at runtime?

I'm not aware of any reason to think that the auto-scaling would affect
your scrollbar ranges. While you happen to be using the scrollbar values
here to represent values tied to the dimensions of the form, there's no
requirement that one do that and so always auto-scaling the scroll bar
values according to the form size would be wrong.

Now, that said...

The current approved mechanism for auto-scaling is to use the
AutoScaleMode and AutoScaleDimensions properties. Along with these is an
AutoScaleFactor that you can use to determine the current scaling, and
with that you can apply a correction yourself to the scrollbar range.

If you really insist on using the deprecated AutoScale property, you can
retrieve the base size through AutoScaleBaseSize and then call the
GetAutoScaleSize(). You can then calculate a ratio yourself from that,
and which you can apply to your scrollbar ranges.

Pete
Dec 10 '07 #3

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

Similar topics

2
by: Nick Cardi | last post by:
I have a very strange issue. I have written a Dot Net application in VB.Net. When the application is run on some laptops the Forms are painted strangely. Labels are much wider then they were when...
4
by: Nacho Nachev | last post by:
Hello, AFIAK ASP.NET (1.1) uses a technology called 'Adpative Rendering' to output HTML that is compliant with the client browser or at least stick to HTML 4 specification or IE. This seems...
8
by: Ganesh J. Acharya | last post by:
SHREE GANESHA how does this work??????????????????????????????????????????????????????? the documentation says that, if the font in the form container changes automatically the form adjust it...
8
by: Just Me | last post by:
I've read the help docs but can't figure what AutoScrollMinSize does. Probably very simple so they felt no need to explain but it is not evident to me. Can someone give a few words about it...
3
by: Charles Law | last post by:
I have just been playing with AutoScale and I am unhappy with the way it appears to work. I have a form created on a desktop m/c where the screen font is Normal (96 dpi). The form looks fine at...
12
by: Brad | last post by:
Does anyone have any other solutions to the Firefox rendering problems with ASP.NET? I've tried the <browsercaps> web.config trick. It didn't work. Am I overlooking something else? Thanks!
0
by: Jeff Morgan | last post by:
I have an application that runs on ASP.NET. We have been working through performance testing and it appears that at about 40-50 users, I start to get CPU bound. The application is a three form,...
2
by: Marc | last post by:
Hi, I have a simply 'one main screen' vb.net application. This works fine on most machines...however on the new wide screen laptops and also on some flat screen monitors the screen does not...
3
by: SAL | last post by:
Hello, I did google this issue and found some stuff related to BrowserCaps section of either web.config or machine.config but it didn't work. It seems that most pages in my webapp are okay but a...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.