无法申报并检查是否存在MDI表格? [英] Unable to declare and check whether MDI Form exist or not ?

查看:65
本文介绍了无法申报并检查是否存在MDI表格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我的项目中有50个MDI表单,所以尝试从

这个程序创建MDI子表单。

但问题是,无法声明为NewFormName。它给了我一个

的错误。还有其他更好的方式吗?我想检查表格是否已经存在

。 ?或者

其他正在发生的事情是,它会在用户点击时打开许多表单。任何想法



Public Sub mCreateForm(ByVal ParentFormName As Form,_

ByVal NewFormName As Form)

Dim oMDIForm作为新的NewFormName


使用oMDIForm

.lblHeader.Text =" Common Parameter - Color"

.MdiParent = ParentFormName

。显示()

。顶部= 0

.Left = 0

结束

结束子


谢谢和最好的问候

ItsMe

解决方案

Hi ItsMe,

在你告诉它的方式中,它看起来像是一个无限循环鼠标点击

事件。

当没有更多的记忆可以使所有这些形式出现错误

因为我没有更多的内存。


我希望这有点帮助,


Cor


Nopes,它不是无限循环,我会在需要的时候调用这个程序

加载表单。所以我在一个模块中写这个函数。每当我需要创建任何表格时,我都会通过

NewFormName。


任何评论?

" Cor" ; < no*@non.com>在消息中写道

news:3f *********************** @ reader22.wxs.nl ...

Hi ItsMe,
在你告诉它的方式中,它看起来像是一个无限循环的鼠标点击
事件。
当没有更多的记忆来制作所有这些形式你得到一个错误
因为我没有更多的记忆。

我希望这有点帮助,

Cor



如果你告诉我们错误是什么,它可能会提供一些信息。

一些错误是非常大的错误。

Hi,

I''ve 50 MDI Forms in my project, so trying to create MDI Child Form from
this procedure.
But the problem is, unable to declare as "NewFormName". It gives me an
error. Is there any
other better way. And I would like to check whether the form already exist
or not. ? Or
else what''s happening is, it opens many forms as the user clicks. Any ideas
?
Public Sub mCreateForm(ByVal ParentFormName As Form, _
ByVal NewFormName As Form)
Dim oMDIForm As New NewFormName

With oMDIForm
.lblHeader.Text = "Common Parameter - Color"
.MdiParent = ParentFormName
.Show()
.Top = 0
.Left = 0
End With
End Sub

Thanks and Best Regards
ItsMe

解决方案

Hi ItsMe,
In the way you tell it, it looks like an endless loop in your mouse click
Event.
When there is no more memory to make all those forms you get an error
because there is no more memory I guess.

I hope this helps a little bit,

Cor


Nopes, its not endless loop, i''ll be calling this procedue whenever i need
to load a form. So I''m writing this function in a module. I''ll be passing
NewFormName, whenever i need to create any form.

Any Comments ?
"Cor" <no*@non.com> wrote in message
news:3f***********************@reader22.wxs.nl...

Hi ItsMe,
In the way you tell it, it looks like an endless loop in your mouse click
Event.
When there is no more memory to make all those forms you get an error
because there is no more memory I guess.

I hope this helps a little bit,

Cor



It could maybe give some information if you tell us what the error is.
A some error is very wide error.


这篇关于无法申报并检查是否存在MDI表格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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