我创建了一个自定义控件,基于Picturebox:
public class Timebar : System.Windows.Forms.PictureBox
如果我手动创建控件/设置所有值等等,这将正确工作,初始化表单的方法。现在我还发现这个,在工具箱的顶部:http://i.imgur.com/4KUc0.png 但是,当我尝试通过msvc插入它时,我会遇到错误。
Failed to create component 'Timebar'. The error message follows:
'System.MissingMethodException: Constructor on type 'SC.Timebar' not found.
这并不是我的Timebar组件的一个大问题(因为我可以手动添加该组件),但我想要制作一个自定义按钮类(比默认的更具特色),这会导致一些问题。
该类中已经有一个构造函数:
public Timebar(Data refr)
{
this._refr = refr;
}
我该如何修复上述错误?
谢谢,
~ Tgys