Home All Groups Group Topic Archive Search About

frmViewAll.DefInstance.Hide()

Author
20 Oct 2006 3:00 AM
jeff
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

Author
20 Oct 2006 3:26 AM
Ryan S. Thiele
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.com> wrote in message
Show quoteHide quote
news:1161313254.482781.26060@k70g2000cwa.googlegroups.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
>
Author
20 Oct 2006 7:10 PM
jeff
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?

Show quoteHide quote
On Oct 19, 10:26 pm, "Ryan S. Thiele" <mali***@verizon.net> wrote:
> 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.com> wrote in messagenews:1161313254.482781.26***@k70g2000cwa.googlegroups.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
Author
20 Oct 2006 8:01 PM
Ryan S. Thiele
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.com> wrote in message
news:1161371445.551791.47180@m73g2000cwd.googlegroups.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?

Show quoteHide quote
On Oct 19, 10:26 pm, "Ryan S. Thiele" <mali***@verizon.net> wrote:
> 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.com> wrote in
> messagenews:1161313254.482781.26***@k70g2000cwa.googlegroups.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
Author
23 Oct 2006 6:31 PM
jeff
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()

Show quoteHide quote
On Oct 20, 3:01 pm, "Ryan S. Thiele" <mali***@verizon.net> wrote:
> 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.com> wrote in messagenews:1161371445.551791.47***@m73g2000cwd.googlegroups.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.net> wrote:
>
> > 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.com> wrote in
> > messagenews:1161313254.482781.26***@k70g2000cwa.googlegroups.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
Author
29 Oct 2006 12:07 AM
jeff
any ideas?

On Oct 23, 1:31 pm, j***@jeffcomputers.com wrote:
Show quoteHide quote
> 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.net> wrote:
>
> > 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.com> wrote in messagenews:1161371445.551791.47***@m73g2000cwd.googlegroups.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.net> wrote:
>
> > > 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.com> wrote in
> > > messagenews:1161313254.482781.26***@k70g2000cwa.googlegroups.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
Author
3 Nov 2006 3:18 PM
jeff
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:
Show quoteHide quote
> 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.net> wrote:
>
> > > 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.com> wrote in messagenews:1161371445.551791.47***@m73g2000cwd.googlegroups.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.net> wrote:
>
> > > > 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.com> wrote in
> > > > messagenews:1161313254.482781.26***@k70g2000cwa.googlegroups.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
Author
3 Nov 2006 4:57 PM
RobinS
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.com> wrote in message
Show quoteHide quote
news:1161628306.998938.122590@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.net> wrote:
>> 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.com> wrote in
>> messagenews:1161371445.551791.47***@m73g2000cwd.googlegroups.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.net> wrote:
>>
>> > 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.com> wrote in
>> > messagenews:1161313254.482781.26***@k70g2000cwa.googlegroups.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
>
Author
4 Nov 2006 1:49 AM
jeff
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?

Show quoteHide quote
On Nov 3, 10:57 am, "RobinS" <Rob...@NoSpam.yah.none> wrote:
> 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.com> wrote in messagenews:1161628306.998938.122***@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.net> wrote:
> >> 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.com> wrote in
> >> messagenews:1161371445.551791.47***@m73g2000cwd.googlegroups.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.net> wrote:
>
> >> > 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.com> wrote in
> >> > messagenews:1161313254.482781.26***@k70g2000cwa.googlegroups.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
Author
4 Nov 2006 2:35 AM
RobinS
Oops. Are you using .Net2003? The MY namespace is only available in
VS2005/.Net2.0 Framework. Sorry about that.

Robin S.

<j***@jeffcomputers.com> wrote in message
Show quoteHide quote
news:1162604985.437020.167440@e3g2000cwe.googlegroups.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.none> wrote:
>> 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.com> wrote in
>> messagenews:1161628306.998938.122***@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.net> wrote:
>> >> 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.com> wrote in
>> >> messagenews:1161371445.551791.47***@m73g2000cwd.googlegroups.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.net> wrote:
>>
>> >> > 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.com> wrote in
>> >> > messagenews:1161313254.482781.26***@k70g2000cwa.googlegroups.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
>
Author
6 Nov 2006 9:19 PM
jeff
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.

Show quoteHide quote
On Nov 3, 8:35 pm, "RobinS" <Rob...@NoSpam.yah.none> wrote:
> Oops. Are you using .Net2003? The MY namespace is only available in
> VS2005/.Net2.0 Framework. Sorry about that.
>
> Robin S.
>
> <j***@jeffcomputers.com> wrote in messagenews:1162604985.437020.167***@e3g2000cwe.googlegroups.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.none> wrote:
> >> 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.com> wrote in
> >> messagenews:1161628306.998938.122***@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.net> wrote:
> >> >> 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.com> wrote in
> >> >> messagenews:1161371445.551791.47***@m73g2000cwd.googlegroups.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.net> wrote:
>
> >> >> > 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.com> wrote in
> >> >> > messagenews:1161313254.482781.26***@k70g2000cwa.googlegroups.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
Author
7 Nov 2006 4:40 AM
RobinS
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


<j***@jeffcomputers.com> wrote in message
Show quoteHide quote
news:1162847989.031620.260540@m73g2000cwd.googlegroups.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.none> wrote:
>> Oops. Are you using .Net2003? The MY namespace is only available in
>> VS2005/.Net2.0 Framework. Sorry about that.
>>
>> Robin S.
>>
>> <j***@jeffcomputers.com> wrote in
>> messagenews:1162604985.437020.167***@e3g2000cwe.googlegroups.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.none> wrote:
>> >> 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.com> wrote in
>> >> messagenews:1161628306.998938.122***@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.net> wrote:
>> >> >> 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.com> wrote in
>> >> >> messagenews:1161371445.551791.47***@m73g2000cwd.googlegroups.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.net> wrote:
>>
>> >> >> > 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.com> wrote in
>> >> >> > messagenews:1161313254.482781.26***@k70g2000cwa.googlegroups.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
>
Author
20 Oct 2006 11:02 PM
gene kelley
On 19 Oct 2006 20:00:54 -0700, j***@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
Author
26 Nov 2006 11:08 PM
Ryan S. Thiele
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" <o***@by.me> wrote in message
news:ipkij2dsgttnspqd01v3qcv4q6idihr7h3@4ax.com...
On 19 Oct 2006 20:00:54 -0700, j***@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