Code being auto-generated

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Why is it that when I remove some lines of code within the "Windows Form
Designer generated code", it regenerates itself when I save the form? I
understand that I'm not supposed to modify code here, but sometimes you need
to. I want to avoid VS regenerating code that I remove. Is this possible?
 
Why is it that when I remove some lines of code within the "Windows Form
Designer generated code", it regenerates itself when I save the form? I
understand that I'm not supposed to modify code here, but sometimes you need
to. I want to avoid VS regenerating code that I remove. Is this possible?

Isn't that the major purpose of partial classes in 2005? You don't
touch the designer code but you can do what you want to the rest.

What are you removing?
 
I'm using the treelistview control from CodeProject. It misbehaves with
vs2005, though. When I try to open the form designer, I get an error
indicating that the treelistviewcomparer1 object has not been properly
instantiated, however, it has. I just delete the relevant lines of code in
the "Windows Form Designer generated code" region, only to have to do this
each time I close then re-open the form...
 

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

Back
Top