开发者

How to close the current form in a SplitContainer?

I have a us开发者_如何转开发er control in my SplitContainer's right panel. A form opens below the user control. Now if i click a button in the user control, that current form should close and a new form should open. How to do this?


You can implement below logic in your app easily:

splitContainer.Panel2.Controls.Remove(myPanel);
splitContainer.Panel2.Controls.Add(myOtherPanel);

which will remove the existing panel from the container and place the other panel. You can extend the same logic to place forms, or separate controls on the container easily.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜