Jump to content
xisto Community
Sign in to follow this  
miCRoSCoPiC^eaRthLinG

VS.NET: Editing Designer Generated Code Problem Old Problem - any workarounds ?

Recommended Posts

HI,

This is a very old & well-known bug in Visual Studio 2003 and I hear it's been recitifed in the 2005 version. But till I get my hands on it (which isn't hapenning soon enough) I still got to use the old VS2003. The problem is: if you mess around with the code that lies in the region "Windows Forms Designer Generated Code" - the form controls just VANISH when you load it up in designer mode. They just won't come back however hard you try - and all you're left with is a BLANK form. Not that it hampers with your code from running in any way - but you can't see the layout of your controls anymore and kind of grope around in the dark... Does anybody know any solutions to this ??? Urgently needed if there is one...

Thanks a lot :P

 

P.S. A little bit of details as to where it's going wrong

-----------------------------------------------------------------

    ......

    ........

 

    'Required by the Windows Form Designer

    Private components As System.ComponentModel.IContainer

 

    'NOTE: The following procedure is required by the Windows Form Designer

    'It can be modified using the Windows Form Designer. 

    'Do not modify it using the code editor.

    Friend WithEvents AxTaskPane As AxtssTaskPane.AxTaskPane

    Friend Shared WithEvents panelMainScreen As System.Windows.Forms.Panel

    ......

    ........


Do you see the last line - that's where I've introduced the keyword "Shared" after the "Friend" keywork - and that's what makes all the controls VANISH COMPLETELY from the designer. If I remove the shared keyword and try - all controls are BACK !!! But I NEED to use the shared keyword there for other modules/classes to be able to access and manipulate that panel. This is very funny and extremely inconvenient at the same time.. So, can anyone suggest a workaround ??

Share this post


Link to post
Share on other sites

i have never encountered such a program i use 2003 ae myself, you could always try to copy all the code and start a new project or solution but the when you paste in the new code it might cause the same problme, if it does all I can think of it get your hands on 2005 and convert your project. what is wierd is that i edit that code sometimes and never had this problem, the only think i can see as a cuase is if you messed up the code, but you says its an old well-know bug, i've never heard of it or had that problem when editing that region, i wounder if you remove the region tage if that helps? thats somethign else you could try cause the problem could be related to how the region tag is.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.