'循环引用'错误但在代码中找不到这样的错误。 [英] 'Circular reference' error but can't find such an error in the code.

查看:88
本文介绍了'循环引用'错误但在代码中找不到这样的错误。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了一个包含标签控件的表单,其中包含每个标签页上的主机用户控件的标签控件。它编译并运行得很好,但

设计器视图失败,并显示已经进行了循环控制引用。

控制权不能归属于自身或为其本身。此外,由于对象的当前状态,有很多操作无效。

错误。但是,当我查看代码时,我看不到代码中的任何位置

看起来它可能会分配循环引用。像''tabMain.Controls.Add(xxx)'这样的

行没有试图将自己添加到

控件集合中,并且所有关系看起来都很合适。还有一些

其他方式可以产生这个错误吗?

-

我曾经认为我可能会犹豫不决但现在我不太确定......

Richard Lewis Haggard
www.Haggard-And-Associates.com

I''ve created in form that has tab controls that contain tab controls that
host user controls on each tab page. It compiles and runs just fine but the
designer view fails with a "A circular control reference has been made. A
control cannot be owned or parented to itself." Additionally, there are a
lot of "Operation is not valid due to the current state of the object."
errors. However, when I look at the code, I do not see any place in the code
that looks like it could be assigning a circular reference. None of the
lines like ''tabMain.Controls.Add(xxx)'' are trying to add themselves to the
control collection and all of the relationships look proper. Is there some
other way that this error can be generated?
--
"I used to think I might be indecisive but now I''m not so sure...."
Richard Lewis Haggard
www.Haggard-And-Associates.com

推荐答案

" Richard Lewis Haggard" < HaggardAtWorldDotStdDotCom>在消息中写道

news:uy ************** @ TK2MSFTNGP02.phx.gbl ...
"Richard Lewis Haggard" <HaggardAtWorldDotStdDotCom> wrote in message
news:uy**************@TK2MSFTNGP02.phx.gbl...
我创建了在包含选项卡控件的选项卡控件中,该选项卡控件在每个选项卡页面上托管用户控件。
I''ve created in form that has tab controls that contain tab controls that
host user controls on each tab page.




选项卡控件上的选项卡控件。听起来像是一个糟糕的用户界面。


Michael



Tab controls on tab controls. Sounds like a bad user interface.

Michael


" Michael C" <无**** @ nospam.com>在消息中写道

news:uv ************** @ TK2MSFTNGP05.phx.gbl ...
"Michael C" <no****@nospam.com> wrote in message
news:uv**************@TK2MSFTNGP05.phx.gbl...
" Richard Lewis Haggard" ; < HaggardAtWorldDotStdDotCom>在消息中写道
新闻:uy ************** @ TK2MSFTNGP02.phx.gbl ...
"Richard Lewis Haggard" <HaggardAtWorldDotStdDotCom> wrote in message
news:uy**************@TK2MSFTNGP02.phx.gbl...
我创建的形式有包含选项卡控件的选项卡控件,用于在每个选项卡页面上托管用户控件。
I''ve created in form that has tab controls that contain tab controls that
host user controls on each tab page.



选项卡控件上的选项卡控件。听起来像是一个糟糕的用户界面。



Tab controls on tab controls. Sounds like a bad user interface.




这是一个非常有用的回复!



That was a really helpful response!


" SP" < EC *********** @ hotmail.com>在消息中写道

新闻:O8 **************** @ TK2MSFTNGP02.phx.gbl ...
"SP" <ec***********@hotmail.com> wrote in message
news:O8****************@TK2MSFTNGP02.phx.gbl...
选项卡控件上的选项卡控件。听起来像是一个糟糕的用户界面。
Tab controls on tab controls. Sounds like a bad user interface.



这是一个非常有用的回复!



That was a really helpful response!




我同意。 :-)


Michael



I agree. :-)

Michael


这篇关于'循环引用'错误但在代码中找不到这样的错误。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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