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 13 2241
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.clo se
-------------------------------------- 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.Sho w
' -- Hide the form:
viewAllForm.hid e
Does this help? Let me know :).
--
Thiele Enterprises - The Power Is In Your Hands Now!
<je**@jeffcompu ters.comwrote in message
news:11******** *************@k 70g2000cwa.goog legroups.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
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...@verizo n.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.clo se
-------------------------------------- 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.Sho w
' -- Hide the form:
viewAllForm.hid e
Does this help? Let me know :).
--
Thiele Enterprises - The Power Is In Your Hands Now!<j...@jeffc omputers.comwro te in messagenews:11* *************** *****@k70g2000c wa.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
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**@jeffcompu ters.comwrote in message
news:11******** *************@m 73g2000cwd.goog legroups.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...@verizo n.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.clo se
-------------------------------------- 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.Sho w
' -- Hide the form:
viewAllForm.hid e
Does this help? Let me know :).
--
Thiele Enterprises - The Power Is In Your Hands
Now!<j...@jeffc omputers.comwro te in
messagenews:11* *************** *****@k70g2000c wa.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
On 19 Oct 2006 20:00:54 -0700, je**@jeffcomput ers.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
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.Sho w()
On Oct 20, 3:01 pm, "Ryan S. Thiele" <mali...@verizo n.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...@jeffcompu ters.comwrote in messagenews:11* *************** *****@m73g2000c wd.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...@verizo n.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.clo se
-------------------------------------- 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.Sho w
' -- Hide the form:
viewAllForm.hid e
Does this help? Let me know :).
--
Thiele Enterprises - The Power Is In Your Hands
Now!<j...@jeffc omputers.comwro te in
messagenews:11* *************** *****@k70g2000c wa.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
any ideas?
On Oct 23, 1:31 pm, j...@jeffcomput ers.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.Sho w()
On Oct 20, 3:01 pm, "Ryan S. Thiele" <mali...@verizo n.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...@jeffcompu ters.comwrote in messagenews:11* *************** *****@m73g2000c wd.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...@verizo n.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.clo se
-------------------------------------- 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.Sho w
' -- Hide the form:
viewAllForm.hid e
Does this help? Let me know :).
--
Thiele Enterprises - The Power Is In Your Hands
Now!<j...@jeffc omputers.comwro te in
messagenews:11* *************** *****@k70g2000c wa.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
Is this too hard of a question to ask? I know opening forms must be
impossible! lol
On Oct 28, 6:07 pm, j...@jeffcomput ers.com wrote:
any ideas?
On Oct 23, 1:31 pm, j...@jeffcomput ers.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.Sho w()
On Oct 20, 3:01 pm, "Ryan S. Thiele" <mali...@verizo n.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...@jeffcompu ters.comwrote in messagenews:11* *************** *****@m73g2000c wd.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...@verizo n.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.clo se
-------------------------------------- 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.Sho w
' -- Hide the form:
viewAllForm.hid e
Does this help? Let me know :).
--
Thiele Enterprises - The Power Is In Your Hands
Now!<j...@jeffc omputers.comwro te in
messagenews:11* *************** *****@k70g2000c wa.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
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**@jeffcompu ters.comwrote in message
news:11******** **************@ m73g2000cwd.goo glegroups.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.Sho w()
On Oct 20, 3:01 pm, "Ryan S. Thiele" <mali...@verizo n.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...@jeffcompu ters.comwrote in messagenews:11 *************** ******@m73g2000 cwd.googlegroup s.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...@verizo n.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.clo se
-------------------------------------- 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.Sho w
' -- Hide the form:
viewAllForm.hid e
Does this help? Let me know :).
--
Thiele Enterprises - The Power Is In Your Hands
Now!<j...@jeffc omputers.comwro te in
messagenews:11* *************** *****@k70g2000c wa.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
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.Ope nForms 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...@jeffcompu ters.comwrote in messagenews:11* *************** ******@m73g2000 cwd.googlegroup s.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.Sho w()
On Oct 20, 3:01 pm, "Ryan S. Thiele" <mali...@verizo n.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...@jeffcompu ters.comwrote in
messagenews:11* *************** *****@m73g2000c wd.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...@verizo n.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.clo se
-------------------------------------- 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.Sho w
' -- Hide the form:
viewAllForm.hid e
Does this help? Let me know :).
--
Thiele Enterprises - The Power Is In Your Hands
Now!<j...@jeffc omputers.comwro te in
messagenews:11* *************** *****@k70g2000c wa.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
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Steve |
last post by:
Visual Studio 2003 C# Windows:
I have a tree view control as my main menu control down the left side of my
application. This has 2 Parent Nodes on it (Jobs and Employees). beneath
these 2 main functions I have 2 sub functions under each("Add Job", "View
Jobs" and "Add User", "View Users"). I have theses subfunctions grouped in a
TabControl, so there are 2 TabControl objects on my main screen, each with 2
pages on.
When the user...
|
by: alex |
last post by:
I'd like to have a show/hide widget on my web site, kind of like "show
details" / "hide details" in Google Groups. Is there a tutorial
explaining how to make them? Google's is a bit complex and it's easy to
get something wrong. If the browser does not support the required
features, I want it to generate a completely static page with the
"details" shown automatically.
|
by: Cal |
last post by:
I converted a vb6 app and it now contains many instances of DefInstance. As
in:
CAG.frmMDINamespace.frmMDI.DefInstance.mnuApplicationItem(glngSET_DEFAULT_PR
INTER_ITEM).Checked = False
Can anyone tell me what the property means? I've been looking in MSDN but
can't find out.
Thanks
|
by: FP |
last post by:
I'm new to Java Script.
I'm displaying comments people have made. Below each persons' comment
I want to add 2 buttons "Reply" and "Amend". Clicking "Reply" would
display an empty text field below the comment with a spell check &
submit button. Clicking "Amend" would display the same buttons & text
field but pre-populated with the original comment.
Using Java Script how do I show / hide the text field in my list of
comments but have...
|
by: ali |
last post by:
Hello every one
i need you help regarding div hide and show. i am having a link like
<a href="#" onClick="expandWin()">show/hide </a>
<div id=showHide>
</div>
within div i have lots of form tags and div elements say n. The problem
| |
by: pamate |
last post by:
hi,
I want to show hide layers. I am able to show and hide layers but i am facing problem that, cant view the cursor in Mozilla,but i can type in input text box, its overlapping the layers.
I don`t want to change the way i have used to show and hide layers.
check down code :-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html...
|
by: vijayB |
last post by:
Hi All,
I have one application designed in VB6.0, and now I've converted it into VB.NET application. I am using visual studio 2003. After conversion it is having too many shared properties i.e. defInstance.
i want to remove those properties and want to write generalized class.
Can anyone please help me to resolve this??
thanks in advance.
|
by: Ralph |
last post by:
Hi,
I was reading effictive C++ and some other books again and they all tell
you about hiding implementation details (proxy/pimpl/inheritance) but
they never really explain when to use it.
I am starting on a new project which is part library so I think it would
be good to hide the implementation for the public classes in the library
but this seems a lot of overhead to me (both when developing and runtime
overhead).
|
by: Debadatta Mishra |
last post by:
Introduction
In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in java so that you can conceal sensitive information inside an image, hide your complete image as text ,search for a particular image inside a directory, minimize the size of the image. However this is not a new concept, there is a concept called Steganography which enables to conceal your secret...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |