Inherit

  • Thread starter Thread starter DAVE P
  • Start date Start date
D

DAVE P

i want to extend the progress bar control via inheritance

my question is...in the ide how can i expose the inherited
control

for instance can i ad my inherited control in the tool box
or is there a property that has control inherits from

thanks
dave
 
I'm not sure if I understood you but since you are inherit from
ProgressBar which inherits from Control in turn you have two
possibilities to expose your extended ProgressBar:

(1) through the Parent property (i.e. extendedProgressBar.Parent =
parentForm;)

or

(2) through the Controls property of the parent form (i.e.
parentForm.Controls.Add(extendedProgressBar);)
 
If you are new to user control just start a Windows Control Library porject.
Once you add Windows Application later then you should be able to see it in
your toolbox.

chanmm
 
Hi Dave,

You have to add it to the toolbox manually. In Visual Studio 2005 it will
appear in the toolbox automatically, but only while the project in which
it's defined is part of the currently active solution. If you want to
reference the assembly from another project in a completely different
solution, then you'll have to add the control to the toolbox manually.

How to: Add Items to the Toolbox
http://msdn2.microsoft.com/en-us/library/ms165355(VS.80).aspx
 
Thanks for the response

Does that also apply to forms
for instance
I Create a form (no controls)
add new properties like:
oconn // sql connection
and other properties
or callback methods for additional event captures
like a Custom FocusChance etc...

thanks
Dave
 
Back
Top