Making a UserControl behave like a Timer control at design time

I have a UserControl in C# that I want to behave like the Timer control, and other controls behave.  That is, at design time, when the user places the control on a form, it drops down to the window below the form instead, and just shows its name.  Also, at runtime, it doesn't display anything.  Does anyone know how to do this

Answer this question

Making a UserControl behave like a Timer control at design time

  • Keyrus

    Sorry if I seem a little dense here, but are you saying that I just need to code it as a component and it will behave the way I want
  • Youssef

    but why would you want a user control without any ui
  • Jester

    Maybe it shouldn't be a control at all.  I was just looking at the built-in controls (components ) that work this way: Timer, OpenFileDialog, SaveFileDialog, ErrorProvider, etc.  If Microsoft sees a use for such a thing, why can't I do it    I have re-coded it as a class, and it works fine.  But, it won't show up in the toolbox because it isn't a control.  I guess I can live with it as-is.
  • MarvinTPA

    yeah the designer is a component designer
  • KennyKls

    note: this is Not!!! solid advice, just taking some stuff I learned from asp.net designers - in asp.net if you make your own designer as a component designer (can't remember how thats done exactly )

    if you forced it to use the component designer, then it should work   dunno seems like it would (override form designer)

  • ahmeds

    Inherit from Component.
  • Making a UserControl behave like a Timer control at design time