Backgroundworker object instead of component

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Marcel Overweel

    Backgroundworker object instead of component

    Hello,

    I am using a BackgroundWorke r as a base class for several workers in a
    windows service application. Because BackgroundWorke r 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 BackgroundWorke r inside this class but that
    feels a bit awkward.

    regards,
    Marcel


  • Bob Powell [MVP]

    #2
    Re: Backgroundworke r object instead of component

    If you're really desperate you can remove the <subtype>Compon ent</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


    Find great Windows Forms articles in Windows Forms Tips and Tricks


    Answer those GDI+ questions with the GDI+ FAQ


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


    "Marcel Overweel" <moverweel@hotm ail.comwrote in message
    news:485f7093$0 $14343$e4fe514c @news.xs4all.nl ...
    Hello,
    >
    I am using a BackgroundWorke r as a base class for several workers in a
    windows service application. Because BackgroundWorke r 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 BackgroundWorke r inside this class but that
    feels a bit awkward.
    >
    regards,
    Marcel
    >
    >

    Comment

    • Marcel Overweel

      #3
      Re: Backgroundworke r object instead of component

      Thanks Bob.

      regards,
      Marcel


      "Bob Powell [MVP]" <bob@spamkiller bobpowell.netsc hreef in bericht
      news:DC91F06E-50F7-4EF5-8A03-04678F549466@mi crosoft.com...
      If you're really desperate you can remove the <subtype>Compon ent</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

      >
      Find great Windows Forms articles in Windows Forms Tips and Tricks

      >
      Answer those GDI+ questions with the GDI+ FAQ

      >
      All new articles provide code in C# and VB.NET.
      Subscribe to the RSS feeds provided and never miss a new article.
      >
      >
      "Marcel Overweel" <moverweel@hotm ail.comwrote in message
      news:485f7093$0 $14343$e4fe514c @news.xs4all.nl ...
      >Hello,
      >>
      >I am using a BackgroundWorke r as a base class for several workers in a
      >windows service application. Because BackgroundWorke r 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 BackgroundWorke r inside this class but that
      >feels a bit awkward.
      >>
      >regards,
      >Marcel
      >>
      >>
      >

      Comment

      Working...