Autoscale problems

C

Cablewizard

This has been driving me nuts.
If I create a form, then change its location using the Location Property prior
to displaying it, the form changes size (shrinks).

For example:
Dim frm as New frmMyForm
frm.location = desiredLocation '<- If I remove this, form is fine, but in
wrong location
frm.showDialog() '<- form shrinks.

I have tried turning AutoScale on and off, no difference.
This happens on the development machine, all fonts and DPI settings are
standard.
There is no reason scaling should be taking place anyway.
Tried all the different StartPosition options, makes no difference (well yes it
alters the StartPosition, but form always shrinks)

After much frustration, the only ways to get around it that I have found are:
1. Set MinimumSize to desired size
2. Show the form centered in the screen and then move it. ugly.
3. Add an additional property to the form, such as StartLocation, then apply the
desired location in the Form Load Event.

In my opinion, this is a bug. Scaling is happening when it should not, contrary
to other settings explicitly telling it not to, i.e. AutoScale = False. I can
move the form at other times just fine, just not prior to displaying it.

Am I missing something?

Gerald
 
C

Cablewizard

heh, thanks.
however, look at resolution number 3. This is what I am having to do. However, I
stand by my point that needing to add an additional property and then apply the
setting elsewhere in the construction of the form should not be necessary.

Gerald
 

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