且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将项目添加到工具箱

更新时间:2023-12-06 16:28:10

从工具箱中使用计时器(或任何其他非可视组件)是如此草率!

另外,其中一个计时器已经存在:System.Windows.Forms.Timer,但这是所有.NET计时器中最差的一个,非常不准确.其目的是取悦那些需要非常简单的用法而不是准确性的开发人员.当可以使用线程时,即在大多数情况下,***避免使用计时器.

我试图从s#工具箱中删除工具以赢得电话开发人员,但没有用!"
那是怎么回事? :-)

开发自定义控件时,当文档窗口中的当前文件显示可使用此控件的上下文时,它们会出现在工具箱上.

—SA
Using a timer (or any other non-visual component) out of toolbox is so sloppy!

Also, one of the timers is already there: System.Windows.Forms.Timer, but this one is the worst of all .NET timers, very inaccurate. The purpose of it is to please developers who need a very simple use, not accuracy. A timer is best avoided when a thread can be used, that is, in most cases.

"I tried to drop tools from s# toolbox to win phone developer but it didn''t work!"
How''s that? :-)

When you develop custom controls, they appear on the tool box when the current file in document windows presents a context where this control can be used.

—SA


Visual Studio Express Edition在某些方面确实受到限制.

我认为使用Express Edition的方式是创建一个具有适当属性的类库(.DLL)(我认为它是ToolboxItemAttribute),以便可以将项目添加到工具箱中.
编译DLL后,您可以创建另一个项目(应用程序),然后手动将该DLL中的组件添加到工具箱中.

由于Express Edition不支持多个项目,因此与专业版相比,手动步骤很多.

然后,它应该照常工作.
Visual Studio Express Edition are really limited in some area like that.

I think the way you would do it with Express edition is to create a class library (.DLL) with the proper attributes (I think it is ToolboxItemAttribute) so that items could be ade to the toolbox.

Once the DLL is compiled, you can create another project (the application) and manually add component from that DLL to the toolbox.

As Express Edition does not support multiple projects, there is a lot of manual step compared to professional edition.

Then it should works as usual.


您可能会使用的另一种解决方法如下.

您可以在表单上拖动另一个组件,然后手动更新代码以改为使用您的类.
Another workaround that you might uses is the following.

You can drag another component on your form and then update the code manually to use your class instead.