AutoScaleBaseSize for Form

S

sonali_reddy123

Hi all,

Recently I have read about autoscaleBaseSize property of the form it
says
that it renders the current font size and resizes the form accordingly.

If i am right this will essentially mean my large font size problem is
solved but when I use
this in my code nothing is fine for me.

Actually the book I have read says you can't change the
AutoScaleBaseSize Value
once it is set. I have searched for similar keyword on Net and I found
myself somewhat
right that this property is used with large font size probelms.

But the prescribed solution is not working it says something like

In constructor of form after InitializeComponent()

Add thess lines of code

Dim sf As System.Drawing.SizeF
sf = Form.GetAutoScaleSize(Me.Font)
Me.AutoScaleBaseSize = sf.ToSize
Me.AutoScale = True 'Note I haven't added this line bcz it is
already true when I add
'my form


Am I wrong?

If not what is the reason behind this misbehaviour.

Thanks for reading this post.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top