MDIForm&儿童形式问题 [英] MDIForm & Child Form Problem

查看:81
本文介绍了MDIForm&儿童形式问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好。

我在使用mdi表格和子表格编码方面遇到了一些麻烦。

加载mdi表格



Hello everybody
I'm having some trouble in coding with the mdi form and a child form.
loading mdi form

SSTransition1.Visible = False
frmChngPass.Show
frmChngPass.Top = 0
frmChngPass.Left = 0







卸载表格更改密码




Unloading the form Change Password

Unload Me
MDIForm1.Show
SSTransition1.Visible = True





,错误是(需要运行时错误424对象)



我做错了什么?



and the error is (Run-time error 424 object required)

What i'm doing wrong?

推荐答案

首先,我会避免使用Sheridan组件 - 我不相信它们可以在Windows 7下工作。



大多数人使用PictureBoxes包含MDI表单上的按钮。注意我说使用,因为不再支持这种语言,并且大多数开发人员正在将程序迁移到.NET(他们能够在哪里)。 MDI在最好的时候也是一个糟糕的用户体验。



话虽如此,我认为错误是由
Firstly I would avoid the use of Sheridan components - I'm not convinced they work under Windows 7.

Most people used PictureBoxes to contain buttons on MDI forms. Note I say "used" as this language is no longer supported and most developers are migrating programs to .NET (where they are able). Also MDI was/is a horrible user experience at the best of times.

Having said that, I presume the error is being produced by the line
SSTransition1.Visible = True

基于你的陈述

Quote:

卸载表格更改密码

和line

Unload Me
MDIForm1.Show

紧接其上方,我也假设这条违规行在子表单中更改密码。但是从您的评论

immediately above it, I also presume that this offending line is in the child form "Change Password". But from your comment

Quote:

我使用sstransition附加mdi表单上的命令按钮

i use sstransition to attach the command buttons on mdi form

SSTransition1 是对MDI父表格的控制。



所以要么

A)把 SSTransition1 .Visible = True 在适当的事件中在MDI表格上,或

B)使用 MDIForm1.SSTransition1.Visible =真



更好的是,不要使用MDI子表格,也不要隐藏按钮。只需将更改密码表单显示为模态。在模态表单关闭之前,用户将无法单击基础按钮。

SSTransition1 is a control on the MDI Parent Form.

So either
A) Put SSTransition1.Visible = True in an appropriate event on the MDI form, or
B) Use MDIForm1.SSTransition1.Visible = True

Better yet, do not use an MDI child form and don't bother hiding the buttons. Just display the "Change Password" form as Modal. The user will not be able to click the underlying buttons until the modal form is closed.


这篇关于MDIForm&儿童形式问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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