Designer Generated Code problem

shomoodro

Member
Joined
Aug 25, 2005
Messages
14
Programming Experience
Beginner
[Resolved]Designer Generated Code problem

Hi All,

I stuck with a problem which is very weird and can't find a solution for it.

I use a form and there are 100s of buttons and several text boxes, tab controls, list boxes etc etc. When I try to change any property to any of those controls, sometimes it happens that it make a complete black out from the designer generated code. Suppose, I edit a comboBox to be named as 'orderType' and its text property to "Order Type" and run the code. Then at first it gives a run time error that the object(the comboBox) is not declared, I stop debugging and found at Designer Generated Code Part there is no declaration for that combo box. If I undo my work, it works again and the declaration at designer generated code part comes back. So my problem is, I'm unable to change anything on my form. More specifically, any change I made (even the size of a button makes that comboBox not working).

Several weeks ago, I had the same problem with a label. Someone suggested to delete the obj\debug- folder and run the code again. It worked at that time, but now its not.

Please suggest something on this. I passed one whole day just to change the name and text property of that comboBox, but failed.

Thank you in advance.

Shomoodro
 
Last edited:
Sometimes the IDE can make a mess of the links between the design window and the code window. I would be inclined to make a new form and copy the controls from the old form to the new in the design window, then copy your code form the old class to the new in the code window. That will hopefully generate a new resource file that does not contain whatever issues the old one seems to.
 
Hi

Thank you for the reply. I did as you told, but it was the same. Then I delete the combobox, delete the ~obj\Debug folder and recreate the comboBox with the same name. Now its working.

Thank you anyway,

Shomoodro
 
yeah, i hope it will stay working.

Another thing is, is it a problem if I edit my code while debugging? Both of the time I had the problem after extensive editing of code at debug time. I wonder whether that was the problem!
 
I can't edit my code while debugging! Sounds like that ~MIGHT~ be your prob but I've had many a trouble with VS.Net. Can't wait for VS.Net 2005 full version. The Beta is already so cool
 
if you're debugging then that means your program is running and the code is locked because it's in use

it's not a bug
 
Steven McDonald said:
I can't edit my code while debugging! Sounds like that ~MIGHT~ be your prob but I've had many a trouble with VS.Net. Can't wait for VS.Net 2005 full version. The Beta is already so cool


While debugging, I put breakpoints, run the code, when the breakpoint hits, I'm able to edit my code and continue running without restart debugging and it works with changed codes (Can't you do that?). But sometimes it asks whether to edit or stop debugging if it violates with the flow of running code (my guess). In this way I can correct one bug in the code and move to another one and so on. But I never changed anything in designer generated code.
 
Back
Top