PC Review


Reply
Thread Tools Rate Thread

Backgroundworker object instead of component

 
 
Marcel Overweel
Guest
Posts: n/a
 
      23rd Jun 2008
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


 
Reply With Quote
 
 
 
 
Bob Powell [MVP]
Guest
Posts: n/a
 
      23rd Jun 2008
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.


"Marcel Overweel" <(E-Mail Removed)> wrote in message
news:485f7093$0$14343$(E-Mail Removed)...
> 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
>
>


 
Reply With Quote
 
Marcel Overweel
Guest
Posts: n/a
 
      24th Jun 2008
Thanks Bob.

regards,
Marcel


"Bob Powell [MVP]" <(E-Mail Removed)> schreef in bericht
newsC91F06E-50F7-4EF5-8A03-(E-Mail Removed)...
> 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.
>
>
> "Marcel Overweel" <(E-Mail Removed)> wrote in message
> news:485f7093$0$14343$(E-Mail Removed)...
>> 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
>>
>>

>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I reuse a BackgroundWorker object? Tom P. Microsoft C# .NET 11 19th Apr 2010 04:33 PM
BackgroundWorker component Rotsey Microsoft C# .NET 1 22nd Oct 2007 03:16 AM
Re: .NET Framework 1.1 - is there a BackgroundWorker Component? Stoitcho Goutsev \(100\) Microsoft Dot NET Framework Forms 0 22nd Jan 2007 03:50 PM
Re: .NET Framework 1.1 - is there a BackgroundWorker Component? Herfried K. Wagner [MVP] Microsoft Dot NET Framework Forms 0 20th Jan 2007 12:35 AM
Use COM object from Excel VBA - made in .NET "ActiveX component can't create object" =?Utf-8?B?YnJhemlsbnV0NTI=?= Microsoft Dot NET 1 12th Apr 2004 05:19 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:00 AM.