How do i stimulate a Mdi child form cmd button click event from the Mdi Parent form?

cwyong1

Active member
Joined
May 20, 2007
Messages
35
Programming Experience
Beginner
HI All
Can someone pls tell me how?

THANK YOU

Here is a snippet of my code ( this code reside in my mdi parent form )

VB.NET:
	Sub SaveToolStripMenuItemClick(ByVal sender As Object, ByVal e As EventArgs)

		If Me.ActiveMdiChild Is  Nothing Then
			messagebox.show("There is nothing to saved","Infor",messageboxbuttons.OK,messageboxicon.Information)
		Else If UCASE(Me.ActiveMdiChild.Name) = "FRMEMPLOYEEWHEREABOUTLOCATOR" Then
			??? WHAT DO I PUT HERE PLS????
		End If
		
	End Sub
 
You should declare a Public method in the child form that calls the PerformClick method of the Button. You can then call that method from the parent on your active MDI child.
 
HI All
Can someone pls tell me how?

THANK YOU

Here is a snippet of my code ( this code reside in my mdi parent form )

VB.NET:
	Sub SaveToolStripMenuItemClick(ByVal sender As Object, ByVal e As EventArgs)

		If Me.ActiveMdiChild Is  Nothing Then
			messagebox.show("There is nothing to saved","Infor",messageboxbuttons.OK,messageboxicon.Information)
		Else If UCASE(Me.ActiveMdiChild.Name) = "FRMEMPLOYEEWHEREABOUTLOCATOR" Then
			??? WHAT DO I PUT HERE PLS????
		End If
		
	End Sub

How about ChildFormHere.Button1.PerformClick() ?
 
Back
Top