Multiple components in one

  • Thread starter Thread starter Emil
  • Start date Start date
E

Emil

I am trying to create a footer that will go on every form in my PDA app. It
will consist of a status bar and a panel with two buttons. In Delphi you can
do this by creating a frame or using visual inheritance.



I would be interested if visual studio can do either and what would be the
best option.

I do know I could create a new component manually code the components then
create a dll then import it into my toolbox then I could drop that component
onto every form. That just seems like a lot of work and on top of that if I
change the code in the component then I have to do the whole process all
over again. It would be great if I only had to do that one time with visual
inheritance.



Any suggestions or recommendations?



Thank You
 
Create your own control inheriting class, manually add to it the controls
you are interested in (statusbar, buttons etc) and then copy paste the 4
lines of code (create, location, size, parent) to every form you want it to
reside in.

If you want to change it, you just change the one class. If on top of that
you want designer support then you are looking at more work which you are
trying to avoid so I will not go into it.

Cheers
Daniel
 
Back
Top