Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Selectively show custom controls on the toolbox bar in VS2005

Selectively show custom controls on the toolbox bar in VS2005

Scheduled Pinned Locked Moved C#
csharpvisual-studiosaleshelpquestion
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Rey9999
    wrote on last edited by
    #1

    Hello everyone, I recently started developing a little set of custom controls for a customer of mine. I first began developing one control, then adding the second according to subsequent requests.. and so on. All these controls I deliver in a single, well-packaged DLL file. All of these controls inherits the standard Control Class. But now, since there are many properties shared amongst those controls, I thought that it would have been tidier and clearer to write a class inheriting Control (let us call it MyPowerfulControl), containing all the properties that are used in all of the other custom controls, and then make my other controls inherit from MyPowerfulControl. Nothing seemed to go wrong so far. But now there's a little issue that's bugging me: when I add my custom controls to the toolbox sidebar in Visual Studio, also MyPowerfulControl is shown (and, I kinda not want this). I know that it's possible, when choosing which controls are to be loaded, to un-check the unwanted control. But this is an annoying task for me and my customers... Isn't there a way to tell MyPowerfulControl never to show up, even in the "Choose Control" dialog?

    ~~~ From Milano to The Hague, easy as it goes ~~~

    R 1 Reply Last reply
    0
    • R Rey9999

      Hello everyone, I recently started developing a little set of custom controls for a customer of mine. I first began developing one control, then adding the second according to subsequent requests.. and so on. All these controls I deliver in a single, well-packaged DLL file. All of these controls inherits the standard Control Class. But now, since there are many properties shared amongst those controls, I thought that it would have been tidier and clearer to write a class inheriting Control (let us call it MyPowerfulControl), containing all the properties that are used in all of the other custom controls, and then make my other controls inherit from MyPowerfulControl. Nothing seemed to go wrong so far. But now there's a little issue that's bugging me: when I add my custom controls to the toolbox sidebar in Visual Studio, also MyPowerfulControl is shown (and, I kinda not want this). I know that it's possible, when choosing which controls are to be loaded, to un-check the unwanted control. But this is an annoying task for me and my customers... Isn't there a way to tell MyPowerfulControl never to show up, even in the "Choose Control" dialog?

      ~~~ From Milano to The Hague, easy as it goes ~~~

      R Offline
      R Offline
      Rey9999
      wrote on last edited by
      #2

      Well, I found a way out - I don't know if it's good programming practice, but it works. I simply declared MyPowerfulControl as an abstract class, and it automagically disappeared from my toolbox. Should this be a Coding Horror, please let me know ;)

      ~~~ From Milano to The Hague, easy as it goes ~~~

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups