473,507 Members | 2,388 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to open another form and close the parent form in vb.net 2005

hi folks,

I am curently working in vb.net 2005. I am stuck at one technical
glitch. How to open another form and close the parent foem in vb.net.

I have tried every thing like me.close as well as i have tried using
dispose method also.

any help is appreciated.
Thank You.

Oct 11 '07 #1
4 5643
On Oct 11, 4:53 am, sajit <nayar.sa...@gmail.comwrote:
hi folks,

I am curently working in vb.net 2005. I am stuck at one technical
glitch. How to open another form and close the parent foem in vb.net.

I have tried every thing like me.close as well as i have tried using
dispose method also.

any help is appreciated.
Thank You.
As in parent form, do you mean the calling form (Me)?

As in:

////////////
Dim form As New Form1()
form.Show()

Me.Close()
///////////

Thanks,

Seth Rowe

Oct 11 '07 #2
Sajit,

Your question depends totaly how you start your forms (about 12
posibilities).

However as you write it, it is impossible to close a calling object from a
detail object, what is happening in your situation.

Normally a called object will be garbaged when it goes out of scope.

If it is that you want to make your form invisible, then do that, that can
in different nice ways. You can even make it transparant from the first
version of dotnet on every Windows (NT based) OS by using the form opacity
property.

Cor
Oct 11 '07 #3
Cor Ligthert [MVP] wrote:
Sajit,

Your question depends totaly how you start your forms (about 12
posibilities).

However as you write it, it is impossible to close a calling object from a
detail object, what is happening in your situation.

Normally a called object will be garbaged when it goes out of scope.

If it is that you want to make your form invisible, then do that, that can
in different nice ways. You can even make it transparant from the first
version of dotnet on every Windows (NT based) OS by using the form opacity
property.

Cor

Could he not define the form in an invisible 1st form, as a public
shared variable?
That way if Form2 calls Form3, Form2 can be closed because Form1
actually has the object?

Miro
Oct 15 '07 #4
Miro,

He can do it in much more ways, however there is an inbuild Application run
in a form as you don't declare it seperatly. Therefore it is exactly as you
write.

Have a look at the answer from Armin, I don't know what it is now, but in
past he was as far as I remember me alway using the application run in a
seperated module.

Like others who are interested in this problem, have a look at that nice
answer from Armin some days ago.

http://groups.google.com/group/micro...852687402957c2

Cor
Oct 16 '07 #5

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

Similar topics

2
12591
by: developer | last post by:
I have a form with a menu on the top. This menu show another form. I want to open this second form maximized inside the parent form just below the menu of the parent form. (Like Microsoft...
2
6956
by: Chandru | last post by:
hi I want to know how to pass values from different forms. That is, i created one parent form. from there i opened child form modeless way. Once i close the child form i need some value from...
5
9061
by: Viper | last post by:
.... say, like MS Word opens another instance of himself when you open another document. If you close the first 'Word', the second document remains alive. I can't figure out how to do the same...
4
21516
by: Claudia Fong | last post by:
Hi, I have more than one forms in my program, and I would like to for example, in form1, I will call form2 and in form2 it will call form3. But the problem is when I call form2.Show, it does...
2
2895
by: Paul | last post by:
Hi this is related to a previous post, hopefully just a bit clearer description o the problem. I have a parent form that opens a new form (child form) while still leaving the parent form open....
1
3918
by: Tony | last post by:
Hi VB.Net Gurus. Initial MDI Child form loads fine. exp. Dim objChild2 As New Form2() objChild2.MdiParent = Me objChild2.Show() MDI Child unloads just fine. Exp.
1
2350
by: HongPuay | last post by:
Hey guys, I am developing a SMS application using VB.net recently. I have a question here. When I click one of the buttons in my parent form, I want its child form(named as PhoneBook) to be...
1
2859
by: jiaudheen | last post by:
hi i have a multiline textbox and a button in parent form. in the child form i have text boxes,comboboxes,button. the thing is i click the button in the parent form ,the child form opens. i fill the...
6
4251
by: dav61000 | last post by:
I have a parent form that uses a Treeview Control and I would like to pass the node selected to a child form where the user will add update or delete the record selected using a dataset. Is there a...
0
1368
by: tirumalab | last post by:
HI all, How can i handle the events of the child form in the base form ,if child form is derived from base form . (C#). Kindly tell me the same with Windows CE 5.0 using C#. Thank you.. ...
0
7319
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,...
0
7376
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...
0
5623
agi2029
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,...
1
5042
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...
0
4702
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...
0
3191
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...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1542
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
760
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.