开发者

Why is a control's load method being called when a hidden form is shown?

I have a form that contains a user control which is contained in a separate 开发者_运维技巧DLL. The DLL is included as a project reference. When I show the form for the first time, I would expect the control's load method to be called. However, if I hide the containing form and later show the form I would NOT expect the control's load() method to be called again, but it is. The form's load method is not being called again when the hidden form is showed.

Can someone please explain why the control's load method is being called again when the control is already loaded? This is causing a problem because the control's load method adds event handler's (not my design) to handle events that already have handlers defined.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜