473,406 Members | 2,371 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Close and Open MDI

1. I am sure there is a way to close the ChildForm from ParentForm

Example
I have several (song) albums. Each album has several songs
So.... Album is my ParentForm and each song has each ChildForm (6 songs = 6 ChildForm)
(Album = Directory, Song = file)
When I change the album (to albumX), I will that all the ChildForms those belong to the Album, to be closed
And then open all the Song/ChildForm of the new album (albumX)
Can anybody tell me how to do it

2. If I open a ChildForm that already opened, I want to show a message and Set the ChildForm Active
How can I do this

Thansk in advance for help

Regards
Joachim.
Nov 20 '05 #1
2 1296
* "=?Utf-8?B?Sm9hY2hpbQ==?=" <an*******@discussions.microsoft.com> scripsit:
1. I am sure there is a way to close the ChildForm from ParentForm.

Example :
I have several (song) albums. Each album has several songs.
So.... Album is my ParentForm and each song has each ChildForm (6 songs = 6 ChildForm).
(Album = Directory, Song = file).
When I change the album (to albumX), I will that all the ChildForms those belong to the Album, to be closed.
And then open all the Song/ChildForm of the new album (albumX).
Can anybody tell me how to do it ?
Loop through the MDI parent's 'MdiChildren' collection and close all
forms that belong to the album. It's likely that you will need to use
the 'DirectCast' operator ;-).
2. If I open a ChildForm that already opened, I want to show a message and Set the ChildForm Active.
How can I do this ?


Call the MDI parent's 'ActivateMdiChild' method and pass a reference to
the MDI child that should be activated to this method.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #2
Thanks Herfried for your reply

Sorry to tell you that I am a beginner in VB.NET, so I don't really know much
Can you please explain it with a code sample

How to loop the MDI parent's 'MdiChildren' collection
How to close it ? With which statement, parameter
'DirectCast' operator, what is this

How to call the MDI parent's 'ActivateMdiChild' method
And what reference should I pass ?

Again. Sorry Herfried. I am a beginner
So please give a code sample

Thanks in advance

Regards,
Nov 20 '05 #3

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

Similar topics

4
by: Andras Gilicz | last post by:
Hi VB fans I'm working on a relatively large project in VB6 with about a dozen forms, including graphs, labels, text boxes, etc. The software itself is actually a flow simulator with more or...
22
by: Bryan | last post by:
i'm curious to know how others handle the closing of files. i seem to always end up with this pattern even though i rarely see others do it. f1 = file('file1') try: # process f1 finally:...
3
by: Daniel | last post by:
TcpClient close() method socket leak when i use TcpClient to open a connection, send data and close the TcpClient with myTcpClientInstance.Close(); it takes 60 seconds for the actual socket on...
2
by: InvisibleMan | last post by:
Hi, I feel a little dumb for asking this (considering im writing TSQL) but there doesn't seem to be any definitive answers on the search engines... Okay I understand that if you open the ADO...
1
by: Tim Marshall | last post by:
In using DAO methods, I close recordsets and set them to nothing. When a DAO.database is dimmed, I set it to nothing. I have an application in which a user clicks on a control on a form and a...
1
by: Alpha | last post by:
I have a Window based application that shows up still running in the task manager when I close it. It reaches the "this.close" statement and then it stops at the "}" at the section of the...
7
by: Alice | last post by:
Hi, In my program, the user can navigate to many different forms. When they go to the next form, I want the form they have left to close. However, the forms aren't closing. Can anyone tell me...
8
by: Greg Strong | last post by:
Hello All, The short questions are 1 Do you know how to make DSN connection close in Access to Oracle 10g Express Edition? &/or 2 Do you know how to make a DSN-less pass-through query...
1
by: Sorin Schwimmer | last post by:
Hi, I tried for the first time a Tix Tree, so, if my question is naive, I apologize upfront. The following code: <code> from Tix import * r=Tk()
7
by: Toccoa | last post by:
After considerable googling - I mean searching with Google(r) - I could not find javascript on a button or <a href=... to close a window in the latest versions of IE and FireFox. There seemed...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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
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...
0
tracyyun
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...
0
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,...

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.