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
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" <ganesh_j...@indiatimes.com> wrote in message
news:1a8444d1.0309...@posting.google.com...
Do you want to change the size at runtime?
--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
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" <ganesh_j...@indiatimes.com> wrote in message
news:1a8444d1.0309...@posting.google.com...
It would be very nice of you if you can find me a way
Thanking you
Ganesh J. Acharya
B.Sc
I think the size does not change immediatelly. The size automatically
changes the next time you open the Form.
--
Armin
"Ganesh J. Acharya" <ganesh_j...@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...
;-(
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]" <hirf...@m.activevb.de> wrote in message
news:eZ5EjONd...@TK2MSFTNGP10.phx.gbl...
"Jay B. Harlow [MVP - Outlook]" <Jay_H...@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.
:-)