1.11M Members

Mdi Child form activate event does not fire

 
0
 

Dear Friends,

There are 2 form (form1,form2) and 2 dialogbox (dialogbox1,diologbox2) in my application.
When application start at that time form 1 loaded, on form 1 when button-1 click, form2(as mdi parent) and dialogbox-1 (with textbox-1 and button-1 as mdichild) show. when button-1 on dialogbox-1 click dialog-2 (with textbox-1) show.

On close event of dialogbox-2 or activate event of dialogbox-1 the data on textbox-1 of dialog-2 will send to textbox-1 of dialogbox-1 but this event does not fired.

 
0
 
Code for button on Form1

Form2.show
dim Child_dialog as new dialog1
Child_dialog.MdiParent = Form2
Child_dialog.show 


Code for button on Dialogbox1 in button click event
Dialog2.show

code for button on dialogbox2 in button click event

dialogbox1.textbox1.text=dialogbox2.textbox1.text
 
0
 

in the button click event for dialog2 are you putting the code to move the text after the me.close() statement? If the form is closed the controls in it can't be read. Also there are 2 buttons on a standard dialog. Make sure you're using the click event for the proper button.

 
0
 

Hi Dear,

My actual problem is that when focus come to dialogbox-1 as dialogbox-2 close event, I want active event of dialogbox-1 to be fired.
But I can not and one more thing is that before Making mdiparent and child it was fire means (active event of dialogbox-1).

 
0
 

put dialog1.show in the button click for dialog2, that will activate it. also in the code you submitted you appear to have 5 different dialogs, child_dialog, dialog1, dialog2, dialogbox1, dialogbox2. this can make it difficult to decipher your meaning. I gather though that the activate event isn't firing on dialog1. Where is the code for dialog1 active event?

 
0
 

**

 Bold Text Here

            Dim newchild As New Dia_Job_assignment
            newchild.MdiParent = Frm_BackGround
            newchild.TextBox1.Text = user_Employee_id
            newchild.TextBox2.Text = user_user_id
            newchild.Activate()

**

 
0
 

That's the code to activate the form. In the form's code declarations is an activate event subroutine, that is triggered when the form is activated. This is called the activate event. If you need something to happen when the form activates this is the subroutine that contains the code that runs when the form is activated(i.e. adding text to a textbox).

You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article