Visual Studio Designer deleting necessary designer code

J

Jesse Houwing

Hello Jason,
Hello,

I'm trying to use the control from here:
http://www.codeproject.com/KB/tabs/Slider.aspx

But the problem is that when I close the form that I put the control
on, the designer removes the call to "new Slider.xSlider()" from the
designer file. Why is this happening?

Which version of Visual Studio, what kind of project (Web, Windows?)?

Can you post the code to a small (smaple) form to show what is going wrong?
 
J

Jason

I'm using Visual Studio 2005 for my main project, but it also happens in
Visual Studio 2008.

The easiest example would be to download the project from the Code Project
link, open the project in Visual Studio 2008, make a change to any property
on main.cs and then close and reopen the form.

Thanks!
 
J

Jesse Houwing

Hello Jason,
I'm using Visual Studio 2005 for my main project, but it also happens
in Visual Studio 2008.

The easiest example would be to download the project from the Code
Project link, open the project in Visual Studio 2008, make a change to
any property on main.cs and then close and reopen the form.

Thanks!

It happens here also, not really sure why. I placed the control in it's own
project and made the constructor public instead of internal (I guess this
is the key element here). All the problems went away. Changed this on xSlider.cs
line 17.

Hope this helps.

Jesse
 
J

Jason

Thanks, I'll give that a shot!

Jesse Houwing said:
Hello Jason,


It happens here also, not really sure why. I placed the control in it's own
project and made the constructor public instead of internal (I guess this
is the key element here). All the problems went away. Changed this on xSlider.cs
line 17.

Hope this helps.

Jesse
 

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

Top