473,394 Members | 1,951 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,394 software developers and data experts.

me.autoscale

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
8 8599
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
"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
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
----------------------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
"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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: M O J O | last post by:
Hi, I have my windows-display-font-size set to "Large fonts" and I've created a new project with two forms. Both of them are 600 width and 400 height. One have autoscale=true and the other is...
2
by: borekfm | last post by:
Hitting two problems when running a new report I've created, that contains a chart/graph. The chart shows three series, two are shown as lines and one as an area. The data come from three different...
0
by: LR | last post by:
I'm having problem scaling controls on the form. I have a form where I'm adding my user control at design time. If I run at 96 dpi it looks fine, all the controls inside my user control are sized...
5
by: Ellis Yu | last post by:
Dear all, In vb6, I'll do it by getting the ratio between the resolution setting in screen and in design mode. Afterward, adjust each control's position and size with the ratio according to the...
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...
5
by: Alex Glass | last post by:
I have created a winforms application and I designed it with the normal display settings, (96DPI) however, when I set the font settings to 120 DPI, my application text labels look all messed up. ...
2
by: =?Utf-8?B?Tmljaw==?= | last post by:
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)....
1
by: RobcPettit | last post by:
Hi Ive created a usercontrol containing a graph and label. What setting do I use so when I maximise the window, the control auto scales also. Regards Robert
7
by: mylixes | last post by:
I am working on a PC with 1280x1024 resolution. Now, my problem is how could my program automatically adjust its forms and all of the controls if I am going to run my program to other PC/laptop with...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.