继承控件 - 在IDE中可用 [英] Inherited control - available in the IDE

查看:53
本文介绍了继承控件 - 在IDE中可用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


我觉得很快...


如果我创建一个继承窗口值的新类表单组件

类,在.Net IDE中是否可以直观地表示这个?


Eg如果我创建了一个名为''mytextbox.vb'的类,它继承了

windows.forms.textbox,还有一些额外的功能,是否有更简单的添加方式这个派生类的实例到我的表单,而不是通过修改我们不应该玩的窗口生成的代码来获得

... ...


谢谢,

Graham

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

推荐答案

格雷厄姆,

将mytextbox添加到工具箱中,然后就可以了拖拽将它放到你的

表格上,就像其他控件一样。


右键单击工具箱,选择添加/删除项目,浏览你

汇编...


对mytextbox程序集的版本控制感到沮丧......我依旧记得

工具箱是特定于版本的......


希望这有帮助

Jay

" Graham Blandford" < GR ************** @ sympatico.ca>在消息中写道

news:qP ********************* @ news20.bellglobal.com ...
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 ...
那你好,

我认为这很简单...

如果我创建一个继承windows $ $ $ $ b组件类的值的新类,可以在.Net IDE中有过这种可视化表示吗?

例如如果我创建一个名为''mytextbox.vb'的类,它继承了
windows.forms.textbox,还有一些额外的功能,是否有一个
更方便的方法将这个派生类的实例添加到我的表单中而不是通过修改我们不应该玩的窗口生成的代码?...

谢谢,
格雷厄姆
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


如果我没有弄错的话,它甚至可以自动添加到VS 2003的工具栏中,如果

创建一个VB Windows控件库项目。


Telmo Sampaio


" Jay B. Harlow [MVP - Outlook]" < JA ************ @ msn.com>在消息中写道

新闻:Oo ************** @ TK2MSFTNGP11.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,将mytextbox添加到工具箱中,然后拖动&像其他控件一样将它放到你的
表格上。

右键单击工具箱,选择添加/删除项目,浏览你
程序集......

对mytextbox程序集的版本控制感到沮丧...我依旧记得
工具箱是版本特定的......

希望这有帮助
Jay

" Graham Blandford" < GR ************** @ sympatico.ca>在消息中写道
新闻:qP ********************* @ news20.bellglobal.com ...
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 ...
你好,

我认为这很快......

如果我创建一个继承windows窗体值的新类
Hi there,

A quickie I think...

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


组件

类,.Net
IDE中是否有可视化表示?
例如如果我创建了一个名为''mytextbox.vb'的类,它继承了
windows.forms.textbox,还有一些额外的功能,是否有
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


更容易

将此派生类的实例添加到我的表单中的方式,而不是通过
修改我们不应该使用的Windows生成的代码?...

谢谢,
格雷厄姆
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




Telmo,

你错了;-)


VS.NET 2002& VS.NET 2003:


派生自System.Windows.Forms.UserControl的UserControl将自动添加到工具箱中。




" Custom"

中的任何其他Control类派生的控件System.Windows.Forms不会自动添加。


我不记得背后的具体理性或推理以上。


我还没有在VS.NET 2005中尝试过...


希望这会有所帮助

周杰伦


" Telmo Sampaio" < TS ****** @ gmail.com>在消息中写道

news:Op ************** @ 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...
它甚至可能是自动添加到VS 2003中的工具栏,如果创建VB Windows控件库项目,如果我没有弄错的话。

Telmo Sampaio

Jay B哈洛[MVP - Outlook]" < JA ************ @ msn.com>在消息中写道
新闻:Oo ************** @ TK2MSFTNGP11.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,
添加mytextbox到你的工具箱,然后你可以拖动&像其他控件一样将它放到你的
表格上。

右键单击工具箱,选择添加/删除项目,浏览你
程序集......

对mytextbox程序集的版本控制感到沮丧......我依稀记得
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


工具箱是特定于版本的......

希望这有助于
Jay

" Graham Blandford" < GR ************** @ sympatico.ca>在消息中写道
新闻:qP ********************* @ news20.bellglobal.com ...
the toolbox is version specific...

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

我认为这很快......

如果我创建一个继承windows窗体值的新类
Hi there,

A quickie I think...

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


组件

类,.Net IDE中是否有可视化表示?
例如如果我创建了一个名为''mytextbox.vb'的类,它继承了
windows.forms.textbox,还有一些额外的功能,是否有
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


更容易

将此派生类的实例添加到我的表单中的方法,而不是通过修改我们不应该使用的Windows生成的代码?...

谢谢,
Graham
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





这篇关于继承控件 - 在IDE中可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆