frmViewAll.DefInstance.Hide() [英] frmViewAll.DefInstance.Hide()

查看:63
本文介绍了frmViewAll.DefInstance.Hide()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图能够显示和隐藏名为viewAllForm的表单。

我在模块中声明了表单的实例。

公共viewAllForm作为新的frmViewAll


然而,当我关闭并尝试再次显示

时,我不断收到运行时错误。这样做的正确方法是什么?我只希望一次打开一个。

他们可以掩盖它,如果他们想要它可以打开它。但无论什么时候他们点击显示它我想让它浮出水面和/或加载如果它没有加载
。我不知道在VB.NET中执行此操作的最佳方法。在VB6中

我会做一个frm。显示

I am attempting to be able to show and hide a form called viewAllForm.
I declared an instance of the form in a module.
Public viewAllForm As New frmViewAll

However I keep getting runtime errors when I close and try and show it
again. What is the proper way to do this? I only want 1 open at a time.
They can cover it up and leave it open if they want. But whenever they
click to show it I want it to come to the surface and/or to load if it
is not loaded. I do not know the best way to do this in VB.NET. In VB6
I would just do a frm.Show

推荐答案

我有2个解决方案:


---------------------------------------- -----------------------------

这种方式每次都会清除表单。


在模块中声明:


公共viewAllForm作为frmViewAll


'' - 每次你想要显示表单,创建一个新实例。


viewAllForm =新的frmViewAll


'' - 隐藏它,关闭它。


viewAllForm.close

-------------------------------- ------或者---------------------------

通过这种方式,您仍然可以获得相关信息表格。例如文本框,

datagrids等


在模块中声明:

公共viewAllForm为新的frmViewAll

'' - 显示表格

viewAllForm.Show


'' - 隐藏表格:

viewAllForm.hide


这有帮助吗?让我知道:)。


-

Thiele Enterprises - 权力掌握在你手中!

< je **@jeffcomputers.com写信息

新闻:11 ********************* @ k70g2000cwa.googlegro ups.com ...
I have 2 solutions:

---------------------------------------------------------------------
This way clears the form everytime.

Declare in the module:

Public viewAllForm As frmViewAll

'' -- Everytime you want to show the form, create a new instance.

viewAllForm = New frmViewAll

'' -- To hide it, close it.

viewAllForm.close
-------------------------------------- OR ---------------------------
This way you will still have information on the form. e.g. textboxes,
datagrids, etc.

Declare in Module:
Public viewAllForm As New frmViewAll

'' -- Show the form
viewAllForm.Show

'' -- Hide the form:
viewAllForm.hide

Does this help? Let me know :).

--
Thiele Enterprises - The Power Is In Your Hands Now!
<je**@jeffcomputers.comwrote in message
news:11*********************@k70g2000cwa.googlegro ups.com...

>我试图显示和隐藏一个名为viewAllForm的表单。

我在一个表单中声明了一个表单的实例模块。

Public viewAllForm As new frmViewAll


然而,当我关闭并尝试显示时,我不断收到运行时错误

再次。这样做的正确方法是什么?我只希望一次打开一个。

他们可以掩盖它,如果他们想要它可以打开它。但无论什么时候他们点击显示它我想让它浮出水面和/或加载如果它没有加载
。我不知道在VB.NET中执行此操作的最佳方法。在VB6中

我只想做一个frm.Show
>I am attempting to be able to show and hide a form called viewAllForm.
I declared an instance of the form in a module.
Public viewAllForm As New frmViewAll

However I keep getting runtime errors when I close and try and show it
again. What is the proper way to do this? I only want 1 open at a time.
They can cover it up and leave it open if they want. But whenever they
click to show it I want it to come to the surface and/or to load if it
is not loaded. I do not know the best way to do this in VB.NET. In VB6
I would just do a frm.Show



第一种方法每次创建一个新表单。我只想要一个。


第二种方法基本上就是我在做什么,看起来非常不稳定

由于某种原因。例如,如果它已经显示并再次显示

,那么它似乎会导致运行时错误。任何想法?


10月19日晚上10点26分,Ryan S. Thiele < mali ... @ verizon.netwrote:
The first method creates a new form each time. I only want ONE.

The second method is basically what I am doing and seems very unstable
for some reason. For example if it is already displayed and you show
again, then it seems like it causes a runtime error. Any ideas?

On Oct 19, 10:26 pm, "Ryan S. Thiele" <mali...@verizon.netwrote:

我有2个解决方案:


------ -------------------------------------------------- -------------

这种方式每次都清除表单。


在模块中声明:


公共viewAllForm作为frmViewAll


'' - 每当你想要显示表单时,创建一个新实例。


viewAllForm =新的frmViewAll


'' - 隐藏它,关闭它。


viewAllForm.close


-------------------------------------- OR ----- ----------------------

这样你仍然可以获得有关表格的信息。例如文本框,

datagrids等


在模块中声明:

公共viewAllForm为新的frmViewAll

'' - 显示表格

viewAllForm.Show


'' - 隐藏表格:

viewAllForm.hide


这有帮助吗?让我知道:)。


-

Thiele Enterprises - 权力掌握在你手中!< j ... @ jeffcomputers.comwrote in messagenews:11 ********************* @ k70g2000cwa.go oglegroups.com ...
I have 2 solutions:

---------------------------------------------------------------------
This way clears the form everytime.

Declare in the module:

Public viewAllForm As frmViewAll

'' -- Everytime you want to show the form, create a new instance.

viewAllForm = New frmViewAll

'' -- To hide it, close it.

viewAllForm.close

-------------------------------------- OR ---------------------------
This way you will still have information on the form. e.g. textboxes,
datagrids, etc.

Declare in Module:
Public viewAllForm As New frmViewAll

'' -- Show the form
viewAllForm.Show

'' -- Hide the form:
viewAllForm.hide

Does this help? Let me know :).

--
Thiele Enterprises - The Power Is In Your Hands Now!<j...@jeffcomputers.comwrote in messagenews:11*********************@k70g2000cwa.go oglegroups.com...

我试图能够显示和隐藏一个名为viewAllForm的表单。

我在一个模块中声明了一个表单实例。

公共viewAllForm As new frmViewAll
I am attempting to be able to show and hide a form called viewAllForm.
I declared an instance of the form in a module.
Public viewAllForm As New frmViewAll


但是当我关闭并尝试再次显示它时,我不断收到运行时错误

。这样做的正确方法是什么?我只希望一次打开一个。

他们可以掩盖它,如果他们想要它可以打开它。但无论什么时候他们点击显示它我想让它浮出水面和/或加载如果它没有加载
。我不知道在VB.NET中执行此操作的最佳方法。在VB6中

我会做一个frm.Show
However I keep getting runtime errors when I close and try and show it
again. What is the proper way to do this? I only want 1 open at a time.
They can cover it up and leave it open if they want. But whenever they
click to show it I want it to come to the surface and/or to load if it
is not loaded. I do not know the best way to do this in VB.NET. In VB6
I would just do a frm.Show


你在使用''Form.Hide' '关闭表单?

第一种方式只显示一个表单。由于您使用

''Form.Close''关闭表单,因此您将处置该对象(将其清除为表单内存)。这就是为什么你要
必须创建一个新表格。


-

Thiele Enterprises - 权力在于你现在的手吧!


-

< je ** @ jeffcomputers.comWrote in message

news:11 ** *******************@m73g2000cwd.googlegro ups.com ...

第一种方法每次都会创建一个新表单。我只想要一个。


第二种方法基本上就是我在做什么,看起来非常不稳定

由于某种原因。例如,如果它已经显示并再次显示

,那么它似乎会导致运行时错误。任何想法?


10月19日晚上10点26分,Ryan S. Thiele < mali ... @ verizon.netwrote:
Are you using ''Form.Hide'' to close the form?
The first way will show only one form. Since you close the form with
''Form.Close'', you dispose the object (clear it form memory). That''s why you
have to create a new form.

--
Thiele Enterprises - The Power Is In Your Hands Now!

--
<je**@jeffcomputers.comwrote in message
news:11*********************@m73g2000cwd.googlegro ups.com...
The first method creates a new form each time. I only want ONE.

The second method is basically what I am doing and seems very unstable
for some reason. For example if it is already displayed and you show
again, then it seems like it causes a runtime error. Any ideas?

On Oct 19, 10:26 pm, "Ryan S. Thiele" <mali...@verizon.netwrote:

我有2个解决方案:


------ -------------------------------------------------- -------------

这种方式每次都清除表单。


在模块中声明:


公共viewAllForm作为frmViewAll


'' - 每当你想要显示表单时,创建一个新实例。


viewAllForm =新的frmViewAll


'' - 隐藏它,关闭它。


viewAllForm.close


-------------------------------------- OR ----- ----------------------

这样你仍然可以获得有关表格的信息。例如文本框,

datagrids等


在模块中声明:

公共viewAllForm为新的frmViewAll

'' - 显示表格

viewAllForm.Show


'' - 隐藏表格:

viewAllForm.hide


这有帮助吗?让我知道:)。


-

Thiele Enterprises - 权力在你手中

现在!< j ... @ jeffcomputers.com写在

messagenews:11 ********************* @ k70g2000cwa.go oglegroups.com ...
I have 2 solutions:

---------------------------------------------------------------------
This way clears the form everytime.

Declare in the module:

Public viewAllForm As frmViewAll

'' -- Everytime you want to show the form, create a new instance.

viewAllForm = New frmViewAll

'' -- To hide it, close it.

viewAllForm.close

-------------------------------------- OR ---------------------------
This way you will still have information on the form. e.g. textboxes,
datagrids, etc.

Declare in Module:
Public viewAllForm As New frmViewAll

'' -- Show the form
viewAllForm.Show

'' -- Hide the form:
viewAllForm.hide

Does this help? Let me know :).

--
Thiele Enterprises - The Power Is In Your Hands
Now!<j...@jeffcomputers.comwrote in
messagenews:11*********************@k70g2000cwa.go oglegroups.com...

我试图能够显示和隐藏名为viewAllForm的表单。

我在模块中声明了表单的实例。

Public viewAllForm As new frmViewAll
I am attempting to be able to show and hide a form called viewAllForm.
I declared an instance of the form in a module.
Public viewAllForm As New frmViewAll


但是当我关闭并尝试显示时,我不断收到运行时错误
再次
。这样做的正确方法是什么?我只希望一次打开一个。

他们可以掩盖它,如果他们想要它可以打开它。但无论什么时候他们点击显示它我想让它浮出水面和/或加载如果它没有加载
。我不知道在VB.NET中执行此操作的最佳方法。在VB6中

我会做一个frm.Show
However I keep getting runtime errors when I close and try and show it
again. What is the proper way to do this? I only want 1 open at a time.
They can cover it up and leave it open if they want. But whenever they
click to show it I want it to come to the surface and/or to load if it
is not loaded. I do not know the best way to do this in VB.NET. In VB6
I would just do a frm.Show



这篇关于frmViewAll.DefInstance.Hide()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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