VS2005 Autogenerated Code Overwrites my class code

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?S2Vycnk=?=

    VS2005 Autogenerated Code Overwrites my class code

    Hi, i'm having a strange issue, I've created a Class dervived from a
    DataGridView that has all my columns, events properties etc defined. I take
    this class and instanciate it on a Form. The problem is when I modify a
    object on the parent form (say resize a button, change colors) the auto code
    gernerator inserts its own code into the initialization section of the parent
    to create the datagridview essentially duplicating all the columns and its
    properties. How can I stop the code gererator from inserting its own code
    for my datagridview, my class has everything already defined. Its really
    annoying I have to delete all the code it throws in after every little change.
  • =?UTF-8?B?TGFzc2UgVsOlZ3PDpnRoZXIgS2FybHNlbg==?=

    #2
    Re: VS2005 Autogenerated Code Overwrites my class code

    Kerry wrote:
    Hi, i'm having a strange issue, I've created a Class dervived from a
    DataGridView that has all my columns, events properties etc defined. I take
    this class and instanciate it on a Form. The problem is when I modify a
    object on the parent form (say resize a button, change colors) the auto code
    gernerator inserts its own code into the initialization section of the parent
    to create the datagridview essentially duplicating all the columns and its
    properties. How can I stop the code gererator from inserting its own code
    for my datagridview, my class has everything already defined. Its really
    annoying I have to delete all the code it throws in after every little change.
    You'll need to find a tutorial, book, article, whatnot on writing
    components. It's not as easy as just plunking together a class. Well, it
    is if you're instantiating it yourself, but once you let Visual Studio
    have it, all sorts of magic happens.

    You can control this magic, however, but you need to know how to do it.
    I don't, but I do know there are excellent books out there on the subject.

    --
    Lasse Vågsæther Karlsen
    mailto:lasse@vk arlsen.no
    Blogger ist ein Veröffentlichungs-Tool von Google, mit dem du ganz einfach deine Gedanken der Welt mitteilen kannst. Mit Blogger kannst du problemlos Texte, Fotos und Videos in deinem persönlichen Blog oder deinem Team-Blog veröffentlichen.

    PGP KeyID: 0xBCDEA2E3

    Comment

    Working...