窗体继承发生错误

adventurous 2009-09-17 01:09:48
namespace MyNewsReader.UI
{
public partial class ChannelInfoViewForm : ChannelInfoFormBase
{
public ChannelInfoViewForm()
{
InitializeComponent();
}
}
}
我在继承channelInfoFormBase窗体时发生错误,这个窗体中就有几个文本框和按钮控件,现在一打开channelInfoViewForm
的窗体设计器就会出现错误提示
...全文
145 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
adventurous 2009-09-17
  • 打赏
  • 举报
回复
ChannelInfoFormBase好像有designer构造器,我用的是vs2008
zhaoweiting0609 2009-09-17
  • 打赏
  • 举报
回复
[Quote=引用 7 楼 wshwh 的回复:]
vs2005的bug,不必理它。设计界面的时候可以是先继承form,要调试时再改回来
[/Quote]

这个问题没遇到过.你可以试试7楼的这个说法
wshwh 2009-09-17
  • 打赏
  • 举报
回复
vs2005的bug,不必理它。设计界面的时候可以是先继承form,要调试时再改回来
xiaoyuzi 2009-09-17
  • 打赏
  • 举报
回复
检查一下你ChannelInfoFormBase 的构造器,是否有designer识别不了的
adventurous 2009-09-17
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 wh_wangjun 的回复:]
派生类找不到基类ChannelInfoFormBase
,须要正确的使用命名空间。
[/Quote]
namespace MyNewsReader.UI
{
public partial class ChannelInfoViewForm : MyNewsReader.UI.ChannelInfoFormBase
{
public ChannelInfoViewForm()
{
InitializeComponent();
}
}
}
这样算加上命名空间了吧,但还是不行
wh_wangjun 2009-09-17
  • 打赏
  • 举报
回复
派生类找不到基类ChannelInfoFormBase
,须要正确的使用命名空间。
adventurous 2009-09-17
  • 打赏
  • 举报
回复
我还不太清楚继承一个窗体的步骤是什么,如果说一下可能我能找出错误
adventurous 2009-09-17
  • 打赏
  • 举报
回复
The designer could not be shown for this file because none of the classes within it can be designed. The designer inspected the following classes in the file: ChannelInfoViewForm --- The base class 'MyNewsReader.UI.ChannelInfoFormBase' could not be loaded. Ensure the assembly has been referenced and that all projects have been built.




Instances of this error (1)

1. Hide Call Stack

at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.EnsureDocument(IDesignerSerializationManager manager)
at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
at System.ComponentModel.Design.Serialization.BasicDesignerLoader.BeginLoad(IDesignerLoaderHost host)

Help with this error

MSDN Help


Forum posts about this error

Search the MSDN Forums for posts related to this error



zhaoweiting0609 2009-09-17
  • 打赏
  • 举报
回复
提示什么?

17,740

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 .NET Framework
社区管理员
  • .NET Framework社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧