By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,234 Members | 1,908 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,234 IT Pros & Developers. It's quick & easy.

Inherited control - available in the IDE

P: n/a
Hi there,

A quickie I think...

If I create a new class that inherits the values of a windows form component
class, can there ever be a visual representation of this in the .Net IDE?

E.g. if I create a class called 'mytextbox.vb' which inherits the
windows.forms.textbox, with some additional functionlity, is there an easier
way of adding instances of this derived class to my form than by modifying
the windows-generated code that we are not supposed to play with?...

Thanks,
Graham
Nov 20 '05 #1
Share this Question
Share on Google+
14 Replies


P: n/a
Graham,
Add the mytextbox to your toolbox, then you can drag & drop it onto your
form like other controls.

Right click on the tool box, and select Add/Remove items, browse for you
assembly...

Bemindful of versioning of the mytextbox assembly... I vaguely remember that
the toolbox is version specific...

Hope this helps
Jay
"Graham Blandford" <gr**************@sympatico.ca> wrote in message
news:qP*********************@news20.bellglobal.com ...
Hi there,

A quickie I think...

If I create a new class that inherits the values of a windows form component class, can there ever be a visual representation of this in the .Net IDE?

E.g. if I create a class called 'mytextbox.vb' which inherits the
windows.forms.textbox, with some additional functionlity, is there an easier way of adding instances of this derived class to my form than by modifying
the windows-generated code that we are not supposed to play with?...

Thanks,
Graham

Nov 20 '05 #2

P: n/a
And it may even be automatically added to the toolbar in VS 2003, if
creating a VB Windows Control Library project, if I am not mistaken.

Telmo Sampaio

"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:Oo**************@TK2MSFTNGP11.phx.gbl...
Graham,
Add the mytextbox to your toolbox, then you can drag & drop it onto your
form like other controls.

Right click on the tool box, and select Add/Remove items, browse for you
assembly...

Bemindful of versioning of the mytextbox assembly... I vaguely remember that the toolbox is version specific...

Hope this helps
Jay
"Graham Blandford" <gr**************@sympatico.ca> wrote in message
news:qP*********************@news20.bellglobal.com ...
Hi there,

A quickie I think...

If I create a new class that inherits the values of a windows form

component
class, can there ever be a visual representation of this in the .Net IDE?
E.g. if I create a class called 'mytextbox.vb' which inherits the
windows.forms.textbox, with some additional functionlity, is there an

easier
way of adding instances of this derived class to my form than by modifying the windows-generated code that we are not supposed to play with?...

Thanks,
Graham


Nov 20 '05 #3

P: n/a
Telmo,
You're mistaken ;-)

For both VS.NET 2002 & VS.NET 2003:

UserControls that derive from System.Windows.Forms.UserControl are
automatically added to the toolbox for you.

"Custom" controls that derive from any other Control class in
System.Windows.Forms are not automatically added.

I do not remember the specific rational or reasoning behind the above.

I have not tried in VS.NET 2005 yet...

Hope this helps
Jay

"Telmo Sampaio" <ts******@gmail.com> wrote in message
news:Op**************@TK2MSFTNGP10.phx.gbl...
And it may even be automatically added to the toolbar in VS 2003, if
creating a VB Windows Control Library project, if I am not mistaken.

Telmo Sampaio

"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:Oo**************@TK2MSFTNGP11.phx.gbl...
Graham,
Add the mytextbox to your toolbox, then you can drag & drop it onto your
form like other controls.

Right click on the tool box, and select Add/Remove items, browse for you
assembly...

Bemindful of versioning of the mytextbox assembly... I vaguely remember

that
the toolbox is version specific...

Hope this helps
Jay
"Graham Blandford" <gr**************@sympatico.ca> wrote in message
news:qP*********************@news20.bellglobal.com ...
Hi there,

A quickie I think...

If I create a new class that inherits the values of a windows form

component
class, can there ever be a visual representation of this in the .Net IDE?
E.g. if I create a class called 'mytextbox.vb' which inherits the
windows.forms.textbox, with some additional functionlity, is there an

easier
way of adding instances of this derived class to my form than by modifying the windows-generated code that we are not supposed to play with?...

Thanks,
Graham



Nov 20 '05 #4

P: n/a
Now you got me confused... I have a VS 2002 in front of me, I created a new
Control Library, compiled it, opened a new Windows Project and I do not see
my new control. Where would it be? In VS 2003 this creates a new entry in
the Toolbox. What am I missing?

Telmo
"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:eV**************@TK2MSFTNGP10.phx.gbl...
Telmo,
You're mistaken ;-)

For both VS.NET 2002 & VS.NET 2003:

UserControls that derive from System.Windows.Forms.UserControl are
automatically added to the toolbox for you.

"Custom" controls that derive from any other Control class in
System.Windows.Forms are not automatically added.

I do not remember the specific rational or reasoning behind the above.

I have not tried in VS.NET 2005 yet...

Hope this helps
Jay

"Telmo Sampaio" <ts******@gmail.com> wrote in message
news:Op**************@TK2MSFTNGP10.phx.gbl...
And it may even be automatically added to the toolbar in VS 2003, if
creating a VB Windows Control Library project, if I am not mistaken.

Telmo Sampaio

"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message news:Oo**************@TK2MSFTNGP11.phx.gbl...
Graham,
Add the mytextbox to your toolbox, then you can drag & drop it onto your form like other controls.

Right click on the tool box, and select Add/Remove items, browse for you assembly...

Bemindful of versioning of the mytextbox assembly... I vaguely remember
that
the toolbox is version specific...

Hope this helps
Jay
"Graham Blandford" <gr**************@sympatico.ca> wrote in message
news:qP*********************@news20.bellglobal.com ...
> Hi there,
>
> A quickie I think...
>
> If I create a new class that inherits the values of a windows form
component
> class, can there ever be a visual representation of this in the .Net

IDE?
>
> E.g. if I create a class called 'mytextbox.vb' which inherits the
> windows.forms.textbox, with some additional functionlity, is there

an easier
> way of adding instances of this derived class to my form than by

modifying
> the windows-generated code that we are not supposed to play with?...
>
> Thanks,
> Graham
>
>



Nov 20 '05 #5

P: n/a
Hi Jay,

This is what I'm confused about....

'mytextbox' has no visual representation at present. All I have is a .vb
filename which has the following;

Public Class myTextBox

Inherits TextBox

Protected Overrides Sub OnPaint(ByVal e As
System.Windows.Forms.PaintEventArgs)
Dim drawBrush As SolidBrush = New SolidBrush(ForeColor)
e.Graphics.DrawString(Text, Font, drawBrush, 0.0F, 0.0F)
End Sub

Public Sub New()
MyBase.New()
Me.SetStyle(ControlStyles.UserPaint, True)
End Sub

Private Sub InitializeComponent()
End Sub

End Class

This is all the class does. I have looked on the msdn for examples and
everything is geared at creating a user-control - building a windows form
component, adding textboxes, then buttons etc. Then having to expose the
methods.properties required.

What I am trying to do is take the standard textbox control and overide one
or two functions, and then be able to gracefully/easily add it to my windows
forms.
To implement this in a form at the moment, I have to modify the
Windows-generated code and replace the 'Dim txtName as New
System.Windows.Forms.Textbox' with 'Dim txtName as New myTextbox'.

Any thoughts or references would be a great help.

Thanks,
Graham

"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:Oo**************@TK2MSFTNGP11.phx.gbl...
Graham,
Add the mytextbox to your toolbox, then you can drag & drop it onto your
form like other controls.

Right click on the tool box, and select Add/Remove items, browse for you
assembly...

Bemindful of versioning of the mytextbox assembly... I vaguely remember that the toolbox is version specific...

Hope this helps
Jay
"Graham Blandford" <gr**************@sympatico.ca> wrote in message
news:qP*********************@news20.bellglobal.com ...
Hi there,

A quickie I think...

If I create a new class that inherits the values of a windows form

component
class, can there ever be a visual representation of this in the .Net IDE?
E.g. if I create a class called 'mytextbox.vb' which inherits the
windows.forms.textbox, with some additional functionlity, is there an

easier
way of adding instances of this derived class to my form than by modifying the windows-generated code that we are not supposed to play with?...

Thanks,
Graham


Nov 20 '05 #6

P: n/a
Check this out:

http://msdn.microsoft.com/library/de...us/dnwinforms/
html/custcntrlsampover.asp

Telmo

"Graham Blandford" <gr**************@sympatico.ca> wrote in message
news:51*********************@news20.bellglobal.com ...
Hi Jay,

This is what I'm confused about....

'mytextbox' has no visual representation at present. All I have is a .vb
filename which has the following;

Public Class myTextBox

Inherits TextBox

Protected Overrides Sub OnPaint(ByVal e As
System.Windows.Forms.PaintEventArgs)
Dim drawBrush As SolidBrush = New SolidBrush(ForeColor)
e.Graphics.DrawString(Text, Font, drawBrush, 0.0F, 0.0F)
End Sub

Public Sub New()
MyBase.New()
Me.SetStyle(ControlStyles.UserPaint, True)
End Sub

Private Sub InitializeComponent()
End Sub

End Class

This is all the class does. I have looked on the msdn for examples and
everything is geared at creating a user-control - building a windows form
component, adding textboxes, then buttons etc. Then having to expose the
methods.properties required.

What I am trying to do is take the standard textbox control and overide one or two functions, and then be able to gracefully/easily add it to my windows forms.
To implement this in a form at the moment, I have to modify the
Windows-generated code and replace the 'Dim txtName as New
System.Windows.Forms.Textbox' with 'Dim txtName as New myTextbox'.

Any thoughts or references would be a great help.

Thanks,
Graham

"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:Oo**************@TK2MSFTNGP11.phx.gbl...
Graham,
Add the mytextbox to your toolbox, then you can drag & drop it onto your
form like other controls.

Right click on the tool box, and select Add/Remove items, browse for you
assembly...

Bemindful of versioning of the mytextbox assembly... I vaguely remember

that
the toolbox is version specific...

Hope this helps
Jay
"Graham Blandford" <gr**************@sympatico.ca> wrote in message
news:qP*********************@news20.bellglobal.com ...
Hi there,

A quickie I think...

If I create a new class that inherits the values of a windows form

component
class, can there ever be a visual representation of this in the .Net IDE?
E.g. if I create a class called 'mytextbox.vb' which inherits the
windows.forms.textbox, with some additional functionlity, is there an

easier
way of adding instances of this derived class to my form than by modifying the windows-generated code that we are not supposed to play with?...

Thanks,
Graham



Nov 20 '05 #7

P: n/a
OK.. OK.. I thnk I answered my question.... with some playing around....
I just created a project, and 'built' that code - which gives me my dll..
which I can add to my toolbox :) - which I appear to be able to add to my
forms :)

Sound right?

Thanks,
Graham
"Graham Blandford" <gr**************@sympatico.ca> wrote in message
news:51*********************@news20.bellglobal.com ...
Hi Jay,

This is what I'm confused about....

'mytextbox' has no visual representation at present. All I have is a .vb
filename which has the following;

Public Class myTextBox

Inherits TextBox

Protected Overrides Sub OnPaint(ByVal e As
System.Windows.Forms.PaintEventArgs)
Dim drawBrush As SolidBrush = New SolidBrush(ForeColor)
e.Graphics.DrawString(Text, Font, drawBrush, 0.0F, 0.0F)
End Sub

Public Sub New()
MyBase.New()
Me.SetStyle(ControlStyles.UserPaint, True)
End Sub

Private Sub InitializeComponent()
End Sub

End Class

This is all the class does. I have looked on the msdn for examples and
everything is geared at creating a user-control - building a windows form
component, adding textboxes, then buttons etc. Then having to expose the
methods.properties required.

What I am trying to do is take the standard textbox control and overide one or two functions, and then be able to gracefully/easily add it to my windows forms.
To implement this in a form at the moment, I have to modify the
Windows-generated code and replace the 'Dim txtName as New
System.Windows.Forms.Textbox' with 'Dim txtName as New myTextbox'.

Any thoughts or references would be a great help.

Thanks,
Graham

"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:Oo**************@TK2MSFTNGP11.phx.gbl...
Graham,
Add the mytextbox to your toolbox, then you can drag & drop it onto your
form like other controls.

Right click on the tool box, and select Add/Remove items, browse for you
assembly...

Bemindful of versioning of the mytextbox assembly... I vaguely remember

that
the toolbox is version specific...

Hope this helps
Jay
"Graham Blandford" <gr**************@sympatico.ca> wrote in message
news:qP*********************@news20.bellglobal.com ...
Hi there,

A quickie I think...

If I create a new class that inherits the values of a windows form

component
class, can there ever be a visual representation of this in the .Net IDE?
E.g. if I create a class called 'mytextbox.vb' which inherits the
windows.forms.textbox, with some additional functionlity, is there an

easier
way of adding instances of this derived class to my form than by modifying the windows-generated code that we are not supposed to play with?...

Thanks,
Graham



Nov 20 '05 #8

P: n/a
yes!
"Graham Blandford" <gr**************@sympatico.ca> wrote in message
news:Fk*********************@news20.bellglobal.com ...
OK.. OK.. I thnk I answered my question.... with some playing around....
I just created a project, and 'built' that code - which gives me my dll..
which I can add to my toolbox :) - which I appear to be able to add to my
forms :)

Sound right?

Thanks,
Graham
"Graham Blandford" <gr**************@sympatico.ca> wrote in message
news:51*********************@news20.bellglobal.com ...
Hi Jay,

This is what I'm confused about....

'mytextbox' has no visual representation at present. All I have is a .vb
filename which has the following;

Public Class myTextBox

Inherits TextBox

Protected Overrides Sub OnPaint(ByVal e As
System.Windows.Forms.PaintEventArgs)
Dim drawBrush As SolidBrush = New SolidBrush(ForeColor)
e.Graphics.DrawString(Text, Font, drawBrush, 0.0F, 0.0F)
End Sub

Public Sub New()
MyBase.New()
Me.SetStyle(ControlStyles.UserPaint, True)
End Sub

Private Sub InitializeComponent()
End Sub

End Class

This is all the class does. I have looked on the msdn for examples and
everything is geared at creating a user-control - building a windows form component, adding textboxes, then buttons etc. Then having to expose the
methods.properties required.

What I am trying to do is take the standard textbox control and overide

one
or two functions, and then be able to gracefully/easily add it to my

windows
forms.
To implement this in a form at the moment, I have to modify the
Windows-generated code and replace the 'Dim txtName as New
System.Windows.Forms.Textbox' with 'Dim txtName as New myTextbox'.

Any thoughts or references would be a great help.

Thanks,
Graham

"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message news:Oo**************@TK2MSFTNGP11.phx.gbl...
Graham,
Add the mytextbox to your toolbox, then you can drag & drop it onto your form like other controls.

Right click on the tool box, and select Add/Remove items, browse for you assembly...

Bemindful of versioning of the mytextbox assembly... I vaguely remember
that
the toolbox is version specific...

Hope this helps
Jay
"Graham Blandford" <gr**************@sympatico.ca> wrote in message
news:qP*********************@news20.bellglobal.com ...
> Hi there,
>
> A quickie I think...
>
> If I create a new class that inherits the values of a windows form
component
> class, can there ever be a visual representation of this in the .Net

IDE?
>
> E.g. if I create a class called 'mytextbox.vb' which inherits the
> windows.forms.textbox, with some additional functionlity, is there

an easier
> way of adding instances of this derived class to my form than by

modifying
> the windows-generated code that we are not supposed to play with?...
>
> Thanks,
> Graham
>
>



Nov 20 '05 #9

P: n/a
Telmo,
VS2002 puts your new User Control at the bottom of the "Windows Forms" tab
of the Toolbox, while VS2003 puts it on the "My User Controls" tab of the
toolbox.

Without customizing the toolbox, I've only ever seen User Control from the
current solution automatically added to the toolbox.

Hope this helps
Jay

"Telmo Sampaio" <ts******@gmail.com> wrote in message
news:eZ**************@TK2MSFTNGP09.phx.gbl...
Now you got me confused... I have a VS 2002 in front of me, I created a new Control Library, compiled it, opened a new Windows Project and I do not see my new control. Where would it be? In VS 2003 this creates a new entry in
the Toolbox. What am I missing?

Telmo
"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:eV**************@TK2MSFTNGP10.phx.gbl...
Telmo,
You're mistaken ;-)

For both VS.NET 2002 & VS.NET 2003:

UserControls that derive from System.Windows.Forms.UserControl are
automatically added to the toolbox for you.

"Custom" controls that derive from any other Control class in
System.Windows.Forms are not automatically added.

I do not remember the specific rational or reasoning behind the above.

I have not tried in VS.NET 2005 yet...

Hope this helps
Jay

"Telmo Sampaio" <ts******@gmail.com> wrote in message
news:Op**************@TK2MSFTNGP10.phx.gbl...
And it may even be automatically added to the toolbar in VS 2003, if
creating a VB Windows Control Library project, if I am not mistaken.

Telmo Sampaio

"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message news:Oo**************@TK2MSFTNGP11.phx.gbl...
> Graham,
> Add the mytextbox to your toolbox, then you can drag & drop it onto your > form like other controls.
>
> Right click on the tool box, and select Add/Remove items, browse for you > assembly...
>
> Bemindful of versioning of the mytextbox assembly... I vaguely remember that
> the toolbox is version specific...
>
> Hope this helps
> Jay
>
>
> "Graham Blandford" <gr**************@sympatico.ca> wrote in message
> news:qP*********************@news20.bellglobal.com ...
> > Hi there,
> >
> > A quickie I think...
> >
> > If I create a new class that inherits the values of a windows form
> component
> > class, can there ever be a visual representation of this in the ..Net IDE?
> >
> > E.g. if I create a class called 'mytextbox.vb' which inherits the
> > windows.forms.textbox, with some additional functionlity, is there an > easier
> > way of adding instances of this derived class to my form than by
modifying
> > the windows-generated code that we are not supposed to play with?... > >
> > Thanks,
> > Graham
> >
> >
>
>



Nov 20 '05 #10

P: n/a
There might be a bug in the VS 2002 machine I have then... no UserControl in
the Windows Forms toolbox :(

Telmo

"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:O#*************@tk2msftngp13.phx.gbl...
Telmo,
VS2002 puts your new User Control at the bottom of the "Windows Forms" tab
of the Toolbox, while VS2003 puts it on the "My User Controls" tab of the
toolbox.

Without customizing the toolbox, I've only ever seen User Control from the
current solution automatically added to the toolbox.

Hope this helps
Jay

"Telmo Sampaio" <ts******@gmail.com> wrote in message
news:eZ**************@TK2MSFTNGP09.phx.gbl...
Now you got me confused... I have a VS 2002 in front of me, I created a

new
Control Library, compiled it, opened a new Windows Project and I do not

see
my new control. Where would it be? In VS 2003 this creates a new entry in
the Toolbox. What am I missing?

Telmo
"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message news:eV**************@TK2MSFTNGP10.phx.gbl...
Telmo,
You're mistaken ;-)

For both VS.NET 2002 & VS.NET 2003:

UserControls that derive from System.Windows.Forms.UserControl are
automatically added to the toolbox for you.

"Custom" controls that derive from any other Control class in
System.Windows.Forms are not automatically added.

I do not remember the specific rational or reasoning behind the above.

I have not tried in VS.NET 2005 yet...

Hope this helps
Jay

"Telmo Sampaio" <ts******@gmail.com> wrote in message
news:Op**************@TK2MSFTNGP10.phx.gbl...
> And it may even be automatically added to the toolbar in VS 2003, if
> creating a VB Windows Control Library project, if I am not mistaken.
>
> Telmo Sampaio
>
> "Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in

message
> news:Oo**************@TK2MSFTNGP11.phx.gbl...
> > Graham,
> > Add the mytextbox to your toolbox, then you can drag & drop it onto
your
> > form like other controls.
> >
> > Right click on the tool box, and select Add/Remove items, browse
for you
> > assembly...
> >
> > Bemindful of versioning of the mytextbox assembly... I vaguely

remember
> that
> > the toolbox is version specific...
> >
> > Hope this helps
> > Jay
> >
> >
> > "Graham Blandford" <gr**************@sympatico.ca> wrote in
message > > news:qP*********************@news20.bellglobal.com ...
> > > Hi there,
> > >
> > > A quickie I think...
> > >
> > > If I create a new class that inherits the values of a windows form > > component
> > > class, can there ever be a visual representation of this in the

.Net > IDE?
> > >
> > > E.g. if I create a class called 'mytextbox.vb' which inherits the > > > windows.forms.textbox, with some additional functionlity, is
there an
> > easier
> > > way of adding instances of this derived class to my form than by
> modifying
> > > the windows-generated code that we are not supposed to play

with?... > > >
> > > Thanks,
> > > Graham
> > >
> > >
> >
> >
>
>



Nov 20 '05 #11

P: n/a
Telmo,
Odd, it shows up right away when I add a new UserControl to the project, its
disabled when your in its designer of course...

You are using the down arrow to go to the bottom of the list of controls?

Which version of VS 2002 (Enterprise Architect, developer, professional)? I
would not expect that to make a difference, I'm using 2002 Enterprise
Architect.

Hope this helps
Jay

"Telmo Sampaio" <ts******@gmail.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
There might be a bug in the VS 2002 machine I have then... no UserControl in the Windows Forms toolbox :(

Telmo

"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:O#*************@tk2msftngp13.phx.gbl...
Telmo,
VS2002 puts your new User Control at the bottom of the "Windows Forms" tab
of the Toolbox, while VS2003 puts it on the "My User Controls" tab of the toolbox.

Without customizing the toolbox, I've only ever seen User Control from the current solution automatically added to the toolbox.

Hope this helps
Jay

"Telmo Sampaio" <ts******@gmail.com> wrote in message
news:eZ**************@TK2MSFTNGP09.phx.gbl...
Now you got me confused... I have a VS 2002 in front of me, I created a
new
Control Library, compiled it, opened a new Windows Project and I do
not see
my new control. Where would it be? In VS 2003 this creates a new entry in the Toolbox. What am I missing?

Telmo
"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message news:eV**************@TK2MSFTNGP10.phx.gbl...
> Telmo,
> You're mistaken ;-)
>
> For both VS.NET 2002 & VS.NET 2003:
>
> UserControls that derive from System.Windows.Forms.UserControl are
> automatically added to the toolbox for you.
>
> "Custom" controls that derive from any other Control class in
> System.Windows.Forms are not automatically added.
>
> I do not remember the specific rational or reasoning behind the
above. >
> I have not tried in VS.NET 2005 yet...
>
> Hope this helps
> Jay
>
> "Telmo Sampaio" <ts******@gmail.com> wrote in message
> news:Op**************@TK2MSFTNGP10.phx.gbl...
> > And it may even be automatically added to the toolbar in VS 2003, if > > creating a VB Windows Control Library project, if I am not mistaken. > >
> > Telmo Sampaio
> >
> > "Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in
message
> > news:Oo**************@TK2MSFTNGP11.phx.gbl...
> > > Graham,
> > > Add the mytextbox to your toolbox, then you can drag & drop it

onto your
> > > form like other controls.
> > >
> > > Right click on the tool box, and select Add/Remove items, browse for you
> > > assembly...
> > >
> > > Bemindful of versioning of the mytextbox assembly... I vaguely
remember
> > that
> > > the toolbox is version specific...
> > >
> > > Hope this helps
> > > Jay
> > >
> > >
> > > "Graham Blandford" <gr**************@sympatico.ca> wrote in message > > > news:qP*********************@news20.bellglobal.com ...
> > > > Hi there,
> > > >
> > > > A quickie I think...
> > > >
> > > > If I create a new class that inherits the values of a windows form > > > component
> > > > class, can there ever be a visual representation of this in the .Net
> > IDE?
> > > >
> > > > E.g. if I create a class called 'mytextbox.vb' which inherits the > > > > windows.forms.textbox, with some additional functionlity, is there an
> > > easier
> > > > way of adding instances of this derived class to my form than

by > > modifying
> > > > the windows-generated code that we are not supposed to play

with?...
> > > >
> > > > Thanks,
> > > > Graham
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Nov 20 '05 #12

P: n/a
Yes I am navigating to the bottom of the Toolbox! :)
I am using Developer Edition. I have not tried it in Enterprise, maybe you
are right, maybe it has to do with the Edition.
I know it does not work because I always show it to my students in VS2002
and then in VS2003.

Telmo
"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:e0**************@TK2MSFTNGP10.phx.gbl...
Telmo,
Odd, it shows up right away when I add a new UserControl to the project, its disabled when your in its designer of course...

You are using the down arrow to go to the bottom of the list of controls?

Which version of VS 2002 (Enterprise Architect, developer, professional)? I would not expect that to make a difference, I'm using 2002 Enterprise
Architect.

Hope this helps
Jay

"Telmo Sampaio" <ts******@gmail.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
There might be a bug in the VS 2002 machine I have then... no UserControl
in
the Windows Forms toolbox :(

Telmo

"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message news:O#*************@tk2msftngp13.phx.gbl...
Telmo,
VS2002 puts your new User Control at the bottom of the "Windows Forms" tab of the Toolbox, while VS2003 puts it on the "My User Controls" tab of the toolbox.

Without customizing the toolbox, I've only ever seen User Control from the current solution automatically added to the toolbox.

Hope this helps
Jay

"Telmo Sampaio" <ts******@gmail.com> wrote in message
news:eZ**************@TK2MSFTNGP09.phx.gbl...
> Now you got me confused... I have a VS 2002 in front of me, I created
a
new
> Control Library, compiled it, opened a new Windows Project and I do not see
> my new control. Where would it be? In VS 2003 this creates a new
entry in
> the Toolbox. What am I missing?
>
> Telmo
> "Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
> news:eV**************@TK2MSFTNGP10.phx.gbl...
> > Telmo,
> > You're mistaken ;-)
> >
> > For both VS.NET 2002 & VS.NET 2003:
> >
> > UserControls that derive from System.Windows.Forms.UserControl are
> > automatically added to the toolbox for you.
> >
> > "Custom" controls that derive from any other Control class in
> > System.Windows.Forms are not automatically added.
> >
> > I do not remember the specific rational or reasoning behind the above. > >
> > I have not tried in VS.NET 2005 yet...
> >
> > Hope this helps
> > Jay
> >
> > "Telmo Sampaio" <ts******@gmail.com> wrote in message
> > news:Op**************@TK2MSFTNGP10.phx.gbl...
> > > And it may even be automatically added to the toolbar in VS
2003, if > > > creating a VB Windows Control Library project, if I am not mistaken. > > >
> > > Telmo Sampaio
> > >
> > > "Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote
in > message
> > > news:Oo**************@TK2MSFTNGP11.phx.gbl...
> > > > Graham,
> > > > Add the mytextbox to your toolbox, then you can drag & drop it onto
> your
> > > > form like other controls.
> > > >
> > > > Right click on the tool box, and select Add/Remove items,

browse for
> you
> > > > assembly...
> > > >
> > > > Bemindful of versioning of the mytextbox assembly... I vaguely
> remember
> > > that
> > > > the toolbox is version specific...
> > > >
> > > > Hope this helps
> > > > Jay
> > > >
> > > >
> > > > "Graham Blandford" <gr**************@sympatico.ca> wrote in

message
> > > > news:qP*********************@news20.bellglobal.com ...
> > > > > Hi there,
> > > > >
> > > > > A quickie I think...
> > > > >
> > > > > If I create a new class that inherits the values of a
windows form
> > > > component
> > > > > class, can there ever be a visual representation of this in the .Net
> > > IDE?
> > > > >
> > > > > E.g. if I create a class called 'mytextbox.vb' which
inherits the
> > > > > windows.forms.textbox, with some additional functionlity, is

there
> an
> > > > easier
> > > > > way of adding instances of this derived class to my form

than by > > > modifying
> > > > > the windows-generated code that we are not supposed to play
with?...
> > > > >
> > > > > Thanks,
> > > > > Graham
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Nov 20 '05 #13

P: n/a
Telmo,
I know it does not work because IT DOES WORK!

It just doesn't work for you for some reason.

I would attach a picture with proof, however the attachment is too large for
the newsgroup

I hope you understand that I really don't have any further to add...

Hope this helps
Jay

"Telmo Sampaio" <ts******@gmail.com> wrote in message
news:uQ**************@TK2MSFTNGP10.phx.gbl... Yes I am navigating to the bottom of the Toolbox! :)
I am using Developer Edition. I have not tried it in Enterprise, maybe you
are right, maybe it has to do with the Edition.
I know it does not work because I always show it to my students in VS2002
and then in VS2003.

Telmo
"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:e0**************@TK2MSFTNGP10.phx.gbl...
Telmo,
Odd, it shows up right away when I add a new UserControl to the project, its
disabled when your in its designer of course...

You are using the down arrow to go to the bottom of the list of controls?
Which version of VS 2002 (Enterprise Architect, developer,

professional)? I
would not expect that to make a difference, I'm using 2002 Enterprise
Architect.

Hope this helps
Jay

<<snip>>
Nov 20 '05 #14

P: n/a
Hey, take it easy! I got it to work here. I was being an asshole.

"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:eC**************@tk2msftngp13.phx.gbl...
Telmo,
I know it does not work because IT DOES WORK!

It just doesn't work for you for some reason.

I would attach a picture with proof, however the attachment is too large

for the newsgroup

I hope you understand that I really don't have any further to add...

Hope this helps
Jay

"Telmo Sampaio" <ts******@gmail.com> wrote in message
news:uQ**************@TK2MSFTNGP10.phx.gbl...
Yes I am navigating to the bottom of the Toolbox! :)
I am using Developer Edition. I have not tried it in Enterprise, maybe you
are right, maybe it has to do with the Edition.
I know it does not work because I always show it to my students in VS2002 and then in VS2003.

Telmo
"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message news:e0**************@TK2MSFTNGP10.phx.gbl...
Telmo,
Odd, it shows up right away when I add a new UserControl to the
project, its
disabled when your in its designer of course...

You are using the down arrow to go to the bottom of the list of

controls?
Which version of VS 2002 (Enterprise Architect, developer,

professional)?
I
would not expect that to make a difference, I'm using 2002 Enterprise
Architect.

Hope this helps
Jay

<<snip>>

Nov 20 '05 #15

This discussion thread is closed

Replies have been disabled for this discussion.