Hi,
I don't know if this is what you are after fully but here goes.
Here MdiParent and MdiChild1 are both FORMs.
Please note the application namespace here is the default of WindowsApplication1
change it to suit your application ( progam ) name in the code below.
Add one button to the MdiParent form to try this code please.
Public Class MdiParent
Private Sub MdiParent_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.Text = "MdiParent"
AddHandler Button1.Click, AddressOf WindowsApplication1.MdiChild1.ChildSub1
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'First this message is shown.>>
MessageBox.Show(
"Hi from the MdiParent FORM!!")
'But this Button.Click SUB also has a HANDLE to the SUB
'WindowsApplication1.MdiChild1.ChildSub1
'hence why you see the second message.
'Then I show the CHILD FORM MdiChild1.>>
MdiChild1.Show()
End Sub
End
Class
Public Class MdiChild1
Public Sub ChildSub1() '<------- Does it is possible with any statement?
MessageBox.Show("Hi there from FORM MdiChild1!!")
End Sub
End Class
Regards,
John
For links to VB.Net tutorials see here.>>
http://social.msdn.microsoft.com/Forums/en-US/vblanguage/thread/29f2179b-997b-4115-a96d-a0834853b835