473,398 Members | 2,404 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,398 software developers and data experts.

MDI w/ child forms using activated event

I have a MDI form with the following
Public fm2 As New Form2()
Public fm3 As New Form3()
and
Private Sub MenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem2.Click
fm2.MdiParent = Me
fm2.Show()
End Sub

Private Sub MenuItem3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem3.Click
fm3.MdiParent = Me
fm3.Show()
End Sub

Both MDIChild have this
Private Sub Form2_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Activated
Me.Text = "Form Two"
End Sub

The first form I show will fire its activated event. the second form to sow will not fire the activated event
If I comment the mdichild = me from the show calls then both child forms will fire the activated event
Can anyone help me get the activated event to fire or both forms regardless of the order in which they are started
Nov 20 '05 #1
1 2552
Hi Slaprade,

I use the me.load event for that instead of the activated, gives me never
trouble.

Cor
I have a MDI form with the following
Public fm2 As New Form2()
Public fm3 As New Form3()
and
Private Sub MenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem2.Click fm2.MdiParent = Me
fm2.Show()
End Sub

Private Sub MenuItem3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem3.Click fm3.MdiParent = Me
fm3.Show()
End Sub

Both MDIChild have this
Private Sub Form2_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Activated Me.Text = "Form Two"
End Sub

The first form I show will fire its activated event. the second form to sow will not fire the activated event If I comment the mdichild = me from the show calls then both child forms will fire the activated event Can anyone help me get the activated event to fire or both forms

regardless of the order in which they are started
Nov 20 '05 #2

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

Similar topics

5
by: Dayne | last post by:
Can a Parent thread catch a event send by a child thread? Dayne
1
by: rawCoder | last post by:
Hi, How can I have an MDI Child Window in such a way that all other MDI Child Windows appear OVER it. Its like a background window which will never overlap another MDI child window. Is this...
8
by: CJack | last post by:
hy, I have an mdi application, i create a child form and I want to know when a button is pressed while that child form is loaded. I have this code: private void frmTestBaby_KeyUp(object sender,...
3
by: James Spibey | last post by:
Hi, I have an MDI application which has aboout 10 child windows. The way the app needs to work is that only one window should be visible at a time and it should be maximized within the parent...
10
by: Charles Law | last post by:
For some reason, when I click the X to close my MDI parent form, the action appears to be re-directed to one of the MDI child forms, and the parent remains open. I am then unable to close the...
4
by: LCAdeveloper | last post by:
Help! Another newbie question I'm afraid. I have a toolbar on an MDI form, which I can control OK to produce a child form. When the child form is active, the appropriate MDI parent form toolbar...
0
by: **Developer** | last post by:
Form.MdiChildActivate Event Occurs when a multiple document interface (MDI) child form is activated or closed within an MDI application. I need to know in the MdiChildActivate event handler...
2
by: Lenster | last post by:
Environment --------------- Visual Studio.NET 2003 Version 7.1.3088 ..NET Framework 1.1 Version 1.1.4322 SP1 XP Professional 5.1.2600 SP2 Build 2600 Problem Description...
4
by: teejayem | last post by:
I have a VB application with one main form. I also have a second form that has the ShowInTaskbar property set to False. If i click another application in the taskbar (for example:- Outlook)...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
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
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.