Hello,
I have a user control that consisting of UserControl, and one Form.
When UserControl Initialize it opens that Form.
In that form I would like to call an event that is fired from user control.
Here is a example:
'Code In UserControl1
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Option Explicit
Public Event FormEvent(ByVal FormEventName As String)
Public Sub OnFormEvent(ByVal localFormEventName As String)
RaiseEvent FormEvent(localFormEventName)
End Sub
Private Sub UserControl_Initialize()
Form1.Show
End Sub
Now when the usercontrol opens the Form1 in Form1 load event I want to call a public sub inside the usercontrol:
'Code In Form1
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Option Explicit
Private Sub Form_Load()
' Call the sub inside UserControl1
End Sub
Is anyone having some ideas?
Here is a simple example. http://www.winpis.com/tmp/DaniWeb.rar