.NET MDI子表单抑制/隐藏标题/图标区域
我有一个子表单(子表单),我想在多个父表单中使用它。我不是专业开发人员(我是建筑师 - 我知道,你可以保存所有笑话......:) - 目前单独工作)。我最终使用了带有子表单的 MDI 表单作为子表单。我最大化了子表单,大多数事情都很好,除了虽然我尝试禁用所有各种小部件(设计器中的子表单显示没有标题/图标/按钮区域),但我在左侧看到两个图标和两组右侧的按钮 - 其中只有恢复按钮起作用。任何一组按钮都适用于单子表单。
有什么办法解决这个问题吗?我希望子表单对用户“透明” - 他们不应该知道正在使用子表单。
我已经进行了快速搜索,并且已经抑制了另一个答案中提到的实际标题 - 为了在设计器中抑制标题栏...
MDI 是正确的技术吗?或者是否有更好的方法来实现相同的技术子窗体出现在多个父窗体中?
VS2008、C#、Windows 7
TIA、 保罗
I have a subform (child) that I want to use in a number of parents. I'm not a professional developer (I'm an architect - I know, you can save all the jokes... :) - working solo at present). I've ended up using an MDI form with the subform as a child. I maximize the subform form and most things are fine except that although I've tried to disable all the various widgets (the subform in the designer shows NO caption/icon/button area), I get TWO icons on the left and TWO sets of buttons on the right - of which ONLY the restore button works. Either of the sets of buttons will work the one child form.
Is there any way around this? I want the subform to be "transparent" the the user - they shouldn't be aware there's a subform in use.
I've done a quick search and I'd already suppressed the actual caption as mentioned in another answer - to get the caption bar suppressed in the designer...
Is MDI the right technology, or is there a better way to have the same subform appear in multiple parent forms?
VS2008, C#, Windows 7
TIA,
Paolo
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您在父级的构造函数中创建 MDI 子窗体,则存在一个 WF 错误,该错误将使字形加倍。下面是一个示例:
将子表单创建代码移至 Load 事件以避免这种情况。
There's a WF bug that will double the glyphs if you create the MDI child form in the parent's constructor. Here's an example:
Move the child form creation code to the Load event to avoid this.