473,786 Members | 2,638 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Multiple Form Issue - Closing Forms

Moving from form to form seems straight forward - but how
would one go about closing a form FROM another form?

I use me.close - to close out a form and the following to
open ("jump to") a new form:
dim f2 as new form2
form2.showdialo g()
How would one go about closing a form - FROM - another
form? In other words closing form 1 - FROM - form2

Thank you.
Nov 20 '05 #1
2 1337
* "Keith" <an*******@disc ussions.microso ft.com> scripsit:
Moving from form to form seems straight forward - but how
would one go about closing a form FROM another form?

I use me.close - to close out a form and the following to
open ("jump to") a new form:
dim f2 as new form2
form2.showdialo g()
How would one go about closing a form - FROM - another
form? In other words closing form 1 - FROM - form2


<URL:http://www.google.de/groups?selm=u%2 3xQOutWDHA.2100 %40TK2MSFTNGP11 .phx.gbl>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #2
Thank you for the post reply - but that does not answer my
question. This code reference - will close form1 and open
form2. I know how to do that.

I'm saying - if one had 3 forms. 1, 2, and 3 - 1 has a
button that opens 2 but leaves 1 open. 2 has a button
that opens 3 and leaves 2 open. Let's say I want to close
form 1 or 2 - FROM form 3 - how would I do that. Every
time I attempt to write some code to close form1 or form2 -
I get an "An unhandled exception of
type 'System.NullRef erenceException '"

-----Original Message-----
* "Keith" <an*******@disc ussions.microso ft.com> scripsit:
Moving from form to form seems straight forward - but how would one go about closing a form FROM another form?

I use me.close - to close out a form and the following to open ("jump to") a new form:
dim f2 as new form2
form2.showdialo g()
How would one go about closing a form - FROM - another
form? In other words closing form 1 - FROM - form2
<URL:http://www.google.de/groups?selm=u%23xQOutWDHA.2100%

40TK2MSFTNGP11. phx.gbl>
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
.

Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
73215
by: RAJ | last post by:
hi plz tell me how to know "how window is going to close"... i have to right code for X button of forms... plz telll me thanks bye
7
3114
by: Siv | last post by:
Hi, I have an MDI application that uses a generic "ShowPage" routine in a module that is called when I want to display a child form. The basic idea is that in the module I have declared each form as follows: Friend F0 As frmMain Friend F1 As frmStart Friend F2 As frmSearch Then in my ShowPage routine (which is passed a string "pageToShow" which is the name of the form I wish to open), I first check to see if we already have an instance...
2
4902
by: Mario | last post by:
Hi, I am trying to create an application with multiple windows forms. The problem that I have is that after creating the window forms, I do not know how to open formN after closing Main form. Each form is in its own class. What I want to do is the following: 1. Click a button on Main menu. 2. Close main menu ( I would use hide if possible) 3. Open form2
2
2391
by: MORALBAROMETER | last post by:
Hallo, I want to write a programming with c#.Net having forms like MS Word. The main form A contain commonly used objects.I have many other forms (B,C,D) etc that have inherited from A. i realised that when i want to open B,or C while in any of the forms a completely new form like A, B, C, or D is opened..that is two forms open at same time. This is actually not what i want. I want a word style of form when documents are open within the...
2
1438
by: Bob | last post by:
Hi, I have an app that requires 4 child forms each created on a separate thread. Each form holds a 3rd Party Phone answering control. The control will only answer the phone if the form has been displayed. Instantiating the form is not enough. The only way I have been able to display the form(s) is myForm.ShowDialog(); myForm.Show() does nothing. (Code snippet below.) So... I can't issue a hide instruction as the calling code is waiting...
14
3367
by: =?Utf-8?B?UHVjY2E=?= | last post by:
Hi, I'm using VS2005 and .net 2.0. I'm creating an application that has 3 forms. I want allow users to move forward and backward with the forms and retain the data users have entered. I thought I'll make the inactive forms invisible but this is creating a memory corruption problem when user close the form2 or form3 and not the formMain. My main form has a Next button which makes the main form invisible and starts a new form which I'll...
11
5297
by: Zytan | last post by:
I have created a new form from the main form. When I close the main form with the 'x' close button, its Form.FormClosed event is run, but not the dialog's. Is this normal? It is ok / dangerous? How can I force shutdown code within the dialog's Form.FormClosed event run? Zytan
0
1113
by: Vivek | last post by:
I am having an issue with MDI form. I have an MDI form and some Child forms. In order to enable for a choice, I am displaying a message box in the FormClosing event of both the forms. When the form is closed individually, the code works fine, closing the form depending on confirmation from the user, other wise the e.Cancel event is set to true. The problem is when I try to close the MDI form when the child forms are open. By virtue of the...
5
3311
by: Neil | last post by:
"lyle" <lyle.fairfield@gmail.comwrote in message news:48c3dde7-07bd-48b8-91c3-e157b703f92b@f3g2000hsg.googlegroups.com... Question for you. I'm doing something similar, only, instead of opening the forms all at once, I'm opening them as needed. I have a main form with multiple records; and then I have a pop-up form that the user opens with button. The pop-up form contains one record relating to the current record in the main form (but...
0
10363
Oralloy
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...
0
10164
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10110
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,...
1
7515
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6748
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5398
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...
0
5534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.