Backgroundworker object instead of component

M

Marcel Overweel

Hello,

I am using a BackgroundWorker as a base class for several workers in a
windows service application. Because BackgroundWorker is derived from
Component, Visual Studio (2008) shows the message
"To add components to your class, drag them from the ToolBox....."

Is there a way to tell Visual Studio not to show this message and just
show the sourcecode whenever I doubleclick on the cs file of the class?

One thing I can think ok is making a base class not derived from
Component and create a BackgroundWorker inside this class but that
feels a bit awkward.

regards,
Marcel
 
B

Bob Powell [MVP]

If you're really desperate you can remove the <subtype>Component</subtype>
definition from the compile settings in the project file.

Then the file will always open in the text editor.

AFAIK there is no way of doing this at the time that the wizard puts the
file in the project.

--
--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
 
M

Marcel Overweel

Thanks Bob.

regards,
Marcel


Bob Powell said:
If you're really desperate you can remove the <subtype>Component</subtype>
definition from the compile settings in the project file.

Then the file will always open in the text editor.

AFAIK there is no way of doing this at the time that the wizard puts the
file in the project.

--
--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
 

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