By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,122 Members | 1,555 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,122 IT Pros & Developers. It's quick & easy.

me.autoscale

P: n/a
SHREE GANESHA

how does this work?????????????????????????????????????????????? ?????????

the documentation says that, if the font in the form container changes
automatically the form adjust it size

please tell me how this is done

Ganesh J. Acharya
B.Sc
Preparing for MCSD
Nov 20 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
what more do you need ?

Gets or sets a value indicating whether the form adjusts its size to fit the
height of the font used on the form and scales its controls.

[Visual Basic]
Public Property AutoScale As Boolean
[C#]
public bool AutoScale {get; set;}
[C++]
public: __property bool get_AutoScale();
public: __property void set_AutoScale(bool);
[JScript]
public function get AutoScale() : Boolean;
public function set AutoScale(Boolean);
Property Value
true if the form will automatically scale itself and its controls based on
the current font assigned to the form; otherwise, false. The default is
true.

Remarks
You can use this property to allow your form and its controls to
automatically adjust based on changes in the font. This can be useful in
applications where the font might increase or decrease based on the language
specified for use by Windows.

To obtain the size the form will auto scale to, use the AutoScaleBaseSize
property. If you want to determine the size the form will auto scale to
based on a specific font, use the GetAutoScaleSize method.

Requirements
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows
2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003
family
--
Regards - One Handed Man

Author : Fish .NET & Keep .NET
=========================================
This posting is provided "AS IS" with no warranties,
and confers no rights.
"Ganesh J. Acharya" <ga**************@indiatimes.com> wrote in message
news:1a*************************@posting.google.co m...
SHREE GANESHA

how does this work?????????????????????????????????????????????? ?????????

the documentation says that, if the font in the form container changes
automatically the form adjust it size

please tell me how this is done

Ganesh J. Acharya
B.Sc
Preparing for MCSD

Nov 20 '05 #2

P: n/a
"Ganesh J. Acharya" <ga**************@indiatimes.com> schrieb:
the documentation says that, if the font in the form container changes
automatically the form adjust it size


Do you want to change the size at runtime?

--
Herfried K. Wagner
MVP VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #3

P: n/a
Ganesh,
Charles Petzold in "Programming Microsoft Windows with Microsoft Visual
Basic .NET" has a write-up on what is going on with the AutoScale property.
And how to use it.

Its a little long winded for me to paraphrase here.

The short of it is the documentation is correct, when you load the form.
After the form is loaded the documentation appears to be wrong (or at least
misleading).

Does this mean the documentation is in error, or we are just interpreting
the documentation incorrectly? I don' know.

If you get a chance read the 8 pages on the Auto Scale property in Petzold's
book.

Hope this helps
Jay

"Ganesh J. Acharya" <ga**************@indiatimes.com> wrote in message
news:1a*************************@posting.google.co m...
SHREE GANESHA

how does this work?????????????????????????????????????????????? ?????????

the documentation says that, if the font in the form container changes
automatically the form adjust it size

please tell me how this is done

Ganesh J. Acharya
B.Sc
Preparing for MCSD

Nov 20 '05 #4

P: n/a
----------------------SHREE GANESHA------------------------
Yes,
I need to know see form changing its aspect with the change
in the size of the fonts during the runtime

It would be very nice of you if you can find me a way

Thanking you
Ganesh J. Acharya
B.Sc
Nov 20 '05 #5

P: n/a
"Ganesh J. Acharya" <ga**************@indiatimes.com> schrieb
----------------------SHREE GANESHA------------------------
Yes,
I need to know see form changing its aspect with the change
in the size of the fonts during the runtime

I think the size does not change immediatelly. The size automatically
changes the next time you open the Form.
--
Armin
Nov 20 '05 #6

P: n/a
Hello,

"Ganesh J. Acharya" <ga**************@indiatimes.com> schrieb:
I need to know see form changing its aspect with the change
in the size of the fonts during the runtime

It would be very nice of you if you can find me a way


See Jay's reply. In the worst case you must scale all the controls by
hand...

;-(

--
Herfried K. Wagner
MVP VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #7

P: n/a
Herfried,
Actually you can use Control.Scale to scale all the controls at once.

If you call Form.Scale (inherited from Control.Scale) the entire form will
be scaled.

The book I referenced earlier describes the correct way of doing this. In
fact he gives a fun little program with a series of buttons that allows the
entire form to change size based on which button you press.

NOTE: Control.Scale should not not be confused with Graphics.ScaleTransform.
Control.Scale can be used to 'zoom' the form itself and any child controls
it has no effect on Drawing. While Graphics.ScaleTransform can be used to
'zoom' any drawing that you do.

However Control.Scale is the 'manual' way of doing its not automatic per se.

Hope this helps
Jay

"Herfried K. Wagner [MVP]" <hi*******@m.activevb.de> wrote in message
news:eZ**************@TK2MSFTNGP10.phx.gbl...
Hello,

"Ganesh J. Acharya" <ga**************@indiatimes.com> schrieb:
I need to know see form changing its aspect with the change
in the size of the fonts during the runtime

It would be very nice of you if you can find me a way


See Jay's reply. In the worst case you must scale all the controls by
hand...

;-(

--
Herfried K. Wagner
MVP VB Classic, VB.NET
http://www.mvps.org/dotnet

Nov 20 '05 #8

P: n/a
Hello,

"Jay B. Harlow [MVP - Outlook]" <Ja********@email.msn.com> schrieb:
Actually you can use Control.Scale to scale all the controls at
once.

If you call Form.Scale (inherited from Control.Scale) the entire form will
be scaled.


Seems to work really good, nevertheless the font size is not scaled (you
mentioned that). I do not have the book, but maybe I will read it soon.

:-)

--
Herfried K. Wagner
MVP VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.