VB 2005 Design View is not Accurate

D

David C. Barber

Hi, I'm having the rather distressing situation where what my VB 2005 SP1
form is showing in design view, is not accurate when it's run.
Specifically, I have a label control that shows all it's text in design
view, but when run either attempts to line wrap (which fails because the
height isn't enough for 2 lines) or chops off the last letter when I change
the alignment. If it makes a difference, this form was converted to 2005
from VB6. This is distressing because what it's telling me is that design
view in VB 2005 doesn't accurately represent what you see when you run.

Can anyone suggest what's going on here, and how it might be fixed so that
design view is accurate?

Thanks!
 
R

RobinS

I had that problem once when the form was developed on one machine and run
on another one. In my case, it was because the DPI settings were different
on each machine.

If you regenerate the code-behind (just change any control and VS does this
automatically), does it make any difference? Are you running it on the same
machine you're developing it on?

Another thing to check is if you are changing any of the properties in your
code, but I assume you've already checked that.

Robin S.
 
D

David C. Barber

I'll give that a try and see.

I am running it on the development machine in the IDE while I'm seeing this.
That's why it concerns me the most that the design form and running form
aren't matching. I have them both on the screen right next to each other.

Thanks!
 
R

RobinS

I was having the exact same problem. Drove me nuts. I only figured it out
because I checked the code-behind values of the sizes of my controls,
changed one of the controls so it regenerated the code-behind, and checked
the sizes again, and voila! They were different!

Good Luck.
Robin S.
-----------------
 

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