label in VS.NET 2003

  • Thread starter Thread starter jez
  • Start date Start date
J

jez

quick short newbie question.. (sorry)

I created my first stupid little program that shows a label saying hello in
a windows app. It all works fine. Worth noting, I didn't create the label
using the toolbox but instead wrote code for it.

My question is the following : When I run the app I get the standard size
for a windows app (the default that comes up with VS.NET), however when I
want to change it manually in the designer it works fine as well but adds
heaps of redundant lines to my code. My program still works but it has
changed.

Same goes for when I create a label using the toolbox, it adds many
redundant lines.

Is there any way I can make sure that VS.NET doesn't add those lines or
change code that I have written ? (i.e. instead of changing label1.AutoSize
= true this.label1.AutoSize - I find it a bit irritating).

Thanks all for your advice,

jez
 
Hi Jez

I think that it's common that the code generated by a tool as the VS.NET
designer is not the more efficient, I think that mostly this is because it's
intended to be easily parseable/generated by the tool itself. in general you
don't have to touch it, and in most cases it does not have a big impact in
the performance.
of course you can always change it once you finish your visual development
, this is particularly true in the case of applications for the pocket pc
platform.
So in the end, let the designer do its coding and focus on your code :)


Hope this help,
 
Back
Top