469,572 Members | 1,307 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,572 developers. It's quick & easy.

frmViewAll.DefInstance.Hide()

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

Oct 20 '06 #1
13 2075
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...
>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

Oct 20 '06 #2
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:
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...
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
Oct 20 '06 #3
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:
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...
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

Oct 20 '06 #4
On 19 Oct 2006 20:00:54 -0700, je**@jeffcomputers.com wrote:
>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

FWIW:
I have a similar issue. I want to show a modal form and then hide it each time the
user is through with the dialog. With a main form and a "empty" dialog form, the
Hide statement works as expected. However, when I add a few controls, some code, and
a third party control, "Hide" does not work properly. The third party control techs
tell me that it's a known bug with "Hide". So, at the moment I'm having to open a
new instance of the dialog each time it's called and will have to revisit this when
the service pack is released and see it the issue was resolved.

Gene
Oct 20 '06 #5
I tried this. But if I try and call show when a form is still open it
will crash. How can I tell if the form is open already?
viewAllForm.Show()

On Oct 20, 3:01 pm, "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!

--<j...@jeffcomputers.comwrote in messagenews:11*********************@m73g2000cwd.go oglegroups.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:
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...
>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
Oct 23 '06 #6
any ideas?

On Oct 23, 1:31 pm, j...@jeffcomputers.com wrote:
I tried this. But if I try and call show when a form is still open it
will crash. How can I tell if the form is open already?
viewAllForm.Show()

On Oct 20, 3:01 pm, "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!
--<j...@jeffcomputers.comwrote in messagenews:11*********************@m73g2000cwd.go oglegroups.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:
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...
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
Oct 28 '06 #7
Is this too hard of a question to ask? I know opening forms must be
impossible! lol

On Oct 28, 6:07 pm, j...@jeffcomputers.com wrote:
any ideas?

On Oct 23, 1:31 pm, j...@jeffcomputers.com wrote:
I tried this. But if I try and call show when a form is still open it
will crash. How can I tell if the form is open already?
viewAllForm.Show()
On Oct 20, 3:01 pm, "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!
--<j...@jeffcomputers.comwrote in messagenews:11*********************@m73g2000cwd.go oglegroups.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:
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...
>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
Nov 3 '06 #8
Iterate through the open forms. Try this:

Dim FoundForm as Boolean = False
For Each myForm in My.Application.OpenForms
if myForm.Name = "whatever" Then
FoundForm = True
Exit For
End If
Next

Robin S.

<je**@jeffcomputers.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
>I tried this. But if I try and call show when a form is still open it
will crash. How can I tell if the form is open already?
viewAllForm.Show()

On Oct 20, 3:01 pm, "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!

--<j...@jeffcomputers.comwrote in
messagenews:11*********************@m73g2000cwd.g ooglegroups.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:
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...
>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

Nov 3 '06 #9
I tried that but I could not figure out what to put in place of My in
the My.Application.OpenForms I tried everything from project name, to
solution name and even tried without it and just start with
Application.OpenForms but it did not work. What is My?

On Nov 3, 10:57 am, "RobinS" <Rob...@NoSpam.yah.nonewrote:
Iterate through the open forms. Try this:

Dim FoundForm as Boolean = False
For Each myForm in My.Application.OpenForms
if myForm.Name = "whatever" Then
FoundForm = True
Exit For
End If
Next

Robin S.

<j...@jeffcomputers.comwrote in messagenews:11**********************@m73g2000cwd.g ooglegroups.com...
I tried this. But if I try and call show when a form is still open it
will crash. How can I tell if the form is open already?
viewAllForm.Show()
On Oct 20, 3:01 pm, "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!
--<j...@jeffcomputers.comwrote in
messagenews:11*********************@m73g2000cwd.go oglegroups.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:
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...
>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
Nov 4 '06 #10
Oops. Are you using .Net2003? The MY namespace is only available in
VS2005/.Net2.0 Framework. Sorry about that.

Robin S.

<je**@jeffcomputers.comwrote in message
news:11**********************@e3g2000cwe.googlegro ups.com...
>I tried that but I could not figure out what to put in place of My in
the My.Application.OpenForms I tried everything from project name, to
solution name and even tried without it and just start with
Application.OpenForms but it did not work. What is My?

On Nov 3, 10:57 am, "RobinS" <Rob...@NoSpam.yah.nonewrote:
>Iterate through the open forms. Try this:

Dim FoundForm as Boolean = False
For Each myForm in My.Application.OpenForms
if myForm.Name = "whatever" Then
FoundForm = True
Exit For
End If
Next

Robin S.

<j...@jeffcomputers.comwrote in
messagenews:11**********************@m73g2000cwd. googlegroups.com...
>I tried this. But if I try and call show when a form is still open it
will crash. How can I tell if the form is open already?
viewAllForm.Show()
On Oct 20, 3:01 pm, "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!
>--<j...@jeffcomputers.comwrote in
messagenews:11*********************@m73g2000cwd.g ooglegroups.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:
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...
>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

Nov 4 '06 #11
What should I do then? Also, is there a better forum that I should be
using? Also, is there anything wrong with .NET 2003, do I need to do
any updates to make my code secure? I have heard some things about
insecure code. Also, what do I need to do on the compile for public
release? Anything special?

Also, how do I make my software work on as old of framework as
possible? And what DLLs and what websites should I point them to if
they have trouble running my software? Thanks.

On Nov 3, 8:35 pm, "RobinS" <Rob...@NoSpam.yah.nonewrote:
Oops. Are you using .Net2003? The MY namespace is only available in
VS2005/.Net2.0 Framework. Sorry about that.

Robin S.

<j...@jeffcomputers.comwrote in messagenews:11**********************@e3g2000cwe.go oglegroups.com...
I tried that but I could not figure out what to put in place of My in
the My.Application.OpenForms I tried everything from project name, to
solution name and even tried without it and just start with
Application.OpenForms but it did not work. What is My?
On Nov 3, 10:57 am, "RobinS" <Rob...@NoSpam.yah.nonewrote:
Iterate through the open forms. Try this:
Dim FoundForm as Boolean = False
For Each myForm in My.Application.OpenForms
if myForm.Name = "whatever" Then
FoundForm = True
Exit For
End If
Next
Robin S.
<j...@jeffcomputers.comwrote in
messagenews:11**********************@m73g2000cwd.g ooglegroups.com...
I tried this. But if I try and call show when a form is still open it
will crash. How can I tell if the form is open already?
viewAllForm.Show()
On Oct 20, 3:01 pm, "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!
--<j...@jeffcomputers.comwrote in
messagenews:11*********************@m73g2000cwd.go oglegroups.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:
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...
>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
Nov 6 '06 #12
I don't have .Net 2003, so I don't know how to access the
collection of open forms -- anyone else?

I also can't answer your other q's for the same reason.
This is the right forum to post them. Hopefully someone
else can help.

I don't know if there's anything "wrong" with .Net2003.
I'm just moving from VB6 to .Net, so I started with the
most current version. It has a lot of neat features not
available in 2003. Micro$oft put a lot more effort into
the Windows Forms aspect of the development tool. Apparently
they thought SmartClient apps were going to go away, so
they put all their effort into Web stuff for the earlier
versions of .Net, but they realized they were mistaken
and corrected themselves.

Good luck; sorry I didn't have an answer for you.
Robin S
<je**@jeffcomputers.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
What should I do then? Also, is there a better forum that I should be
using? Also, is there anything wrong with .NET 2003, do I need to do
any updates to make my code secure? I have heard some things about
insecure code. Also, what do I need to do on the compile for public
release? Anything special?

Also, how do I make my software work on as old of framework as
possible? And what DLLs and what websites should I point them to if
they have trouble running my software? Thanks.

On Nov 3, 8:35 pm, "RobinS" <Rob...@NoSpam.yah.nonewrote:
>Oops. Are you using .Net2003? The MY namespace is only available in
VS2005/.Net2.0 Framework. Sorry about that.

Robin S.

<j...@jeffcomputers.comwrote in
messagenews:11**********************@e3g2000cwe.g ooglegroups.com...
>I tried that but I could not figure out what to put in place of My in
the My.Application.OpenForms I tried everything from project name, to
solution name and even tried without it and just start with
Application.OpenForms but it did not work. What is My?
On Nov 3, 10:57 am, "RobinS" <Rob...@NoSpam.yah.nonewrote:
Iterate through the open forms. Try this:
> Dim FoundForm as Boolean = False
For Each myForm in My.Application.OpenForms
if myForm.Name = "whatever" Then
FoundForm = True
Exit For
End If
Next
>Robin S.
><j...@jeffcomputers.comwrote in
messagenews:11**********************@m73g2000cwd. googlegroups.com...
>I tried this. But if I try and call show when a form is still open it
will crash. How can I tell if the form is open already?
viewAllForm.Show()
On Oct 20, 3:01 pm, "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!
>--<j...@jeffcomputers.comwrote in
messagenews:11*********************@m73g2000cwd.g ooglegroups.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:
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...
>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

Nov 7 '06 #13
OK, Sorry I was in a move, and had no WWW for a few weeks. To answer your
question. If you want to show another form, Just declare it new.

Dim f1 as new FrmViewAll

by declare it new, you are allocating the memory for this form.

Open the form.

f1.open

Close the form. (clreas the memory)

f1.close

------------------------------------
Also,

You can try to alter the new statement to load the form with variables.

Try this:

Public sub new (info as string, i as integer)
label1.text = info
label2.text = i
end sub

Does this help? Try to email me. I may be able to help you.
--
Thiele Enterprises - The Power Is In Your Hands Now!

--
"gene kelley" <ok**@by.mewrote in message
news:ip********************************@4ax.com...
On 19 Oct 2006 20:00:54 -0700, je**@jeffcomputers.com wrote:
>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

FWIW:
I have a similar issue. I want to show a modal form and then hide it each
time the
user is through with the dialog. With a main form and a "empty" dialog
form, the
Hide statement works as expected. However, when I add a few controls, some
code, and
a third party control, "Hide" does not work properly. The third party
control techs
tell me that it's a known bug with "Hide". So, at the moment I'm having to
open a
new instance of the dialog each time it's called and will have to revisit
this when
the service pack is released and see it the issue was resolved.

Gene
Nov 26 '06 #14

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by alex | last post: by
4 posts views Thread by Cal | last post: by
7 posts views Thread by FP | last post: by
5 posts views Thread by ali | last post: by
6 posts views Thread by Ralph | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.