why does build resize form controls?

G

Guest

I'd posted months without having a grasp of what the problem really is. The
issue is with an Infragistics UltraWinListBar control. It's on a base form,
many forms inherit from the base form. The UltraWinListBar controls on the
inherited forms seem to want to use their own size information instead of the
inherited size values. I hit reset in properties, and the control returns to
the inherited size (75,568). But, then I build (or rebuild) and the control
returns to 75,547. It's bizarre and frustraing. Locking the control does no
good. Is something stuck in a cache somewhere? I just don't get it. If anyone
knows of this issue, I'd appreciate a response.
Thanks,
Shamus
 
G

Guest

And, I just searched my whole local file system. No source code file contains
the string '547'. Also a project level search in VS reports no generated
hidden winform code setting the control to 547 height. So, I'm stumped as to
how much less why the control resizes to 547 high. Anybody?

shamus
 
G

Guest

I also just noticed, I don't even have to build, I can just reset the form
size, save, close the form and when I reopen it, it resizes, frustrating at
best.
 
G

Guest

So, has anybody else even seen this? I ask because I've never been able to
get a reasonable explanation. Or any explanation actually. I find it hard to
believe that I'm the only person whose run into this issue.
 
B

Bob Powell [MVP]

Ask Infragistics?

Forms I create seem to remain the size I assign to them. I'm not using
Infragistics tools so I suspect that the problem you're seeing is solely to
do with a third party product.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
 
S

saurabh

I would say, its to do with autoscaling. The Winforms autoscale depending on
the fact that the font size in design mode is different to the one when its
running. When the AutoScale property is set to true, the framework checks
for the AutoScaleBaseSize and then scales the controls accordingly.

Are you using 120 DPI whereas the base one was designed at 96 DPI or other
way round

--Saurabh
 
S

saurabh

Try searching for a line like this :
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);

I suspect that the size is different for base form and derived form.
possibly (5, 16) ?

--Saurabh
 

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