Adding control to a form delets the custom control from the form
-
I have combobox custom control developed by my collogues in C#. I reuse it often in my project. I have some problem when I reopen my project in V.S. Like if I make some changes, add some more standard control and save it. The visual studio envirnoment deletes this custom control from the form. It deletes all the entries of this CC from both .cs and .resx file. Any idea why this is happening ? And how to avoid it ? I have a work around for this when ever I have to add new control I manualy edit the CS file in notepad (Its pain, bcoz got use to VS no more programming in Windows SDK). But I don't modify the .resx (because its complecated XML). Does this ( not modifying .resx file ) cause any problem ? Sandeep Naik
-
I have combobox custom control developed by my collogues in C#. I reuse it often in my project. I have some problem when I reopen my project in V.S. Like if I make some changes, add some more standard control and save it. The visual studio envirnoment deletes this custom control from the form. It deletes all the entries of this CC from both .cs and .resx file. Any idea why this is happening ? And how to avoid it ? I have a work around for this when ever I have to add new control I manualy edit the CS file in notepad (Its pain, bcoz got use to VS no more programming in Windows SDK). But I don't modify the .resx (because its complecated XML). Does this ( not modifying .resx file ) cause any problem ? Sandeep Naik
Does your friend's comboBox custom control constructor requires some argument? If yes. That is causing the problem. Actually only default constructors are supported by .Net Designer. Making designer to support the overloaded constructors with arguments, requires some additional things to do. I am not very clear about this. Some body else may give you more detail informations. Regards, Jay
-
I have combobox custom control developed by my collogues in C#. I reuse it often in my project. I have some problem when I reopen my project in V.S. Like if I make some changes, add some more standard control and save it. The visual studio envirnoment deletes this custom control from the form. It deletes all the entries of this CC from both .cs and .resx file. Any idea why this is happening ? And how to avoid it ? I have a work around for this when ever I have to add new control I manualy edit the CS file in notepad (Its pain, bcoz got use to VS no more programming in Windows SDK). But I don't modify the .resx (because its complecated XML). Does this ( not modifying .resx file ) cause any problem ? Sandeep Naik
I just found the details. There is reply from Mr. Heath detailing the same subject. Below is the link: Custom Controls and GUI Designer[^]