G
Guest
Hi,
I have one form where I want to open several other forms from, withevents.
Ideally I want to have the same event raised, but I don't know if this can
be done.
For example, in the main form ("MainForm") I can have in the declarations
section:
Private WithEvents OtherForm as Form Form_Form1
and then in Form1 I can raise an event. In MainForm, any events are
available in the vb window, and all is fine.
If I use:
Private WithEvents OtherForm as Form
and then open the form with:
Set OtherForm As New Form1
I can't raise an event in MainForm from Form1, and the event isn't available
in the vb window.
Is it possible to have multiple forms raising the same event within my first
form? I know I could do this by multiple declarations, but is this the only
way?
Thanks in advance.
swas
I have one form where I want to open several other forms from, withevents.
Ideally I want to have the same event raised, but I don't know if this can
be done.
For example, in the main form ("MainForm") I can have in the declarations
section:
Private WithEvents OtherForm as Form Form_Form1
and then in Form1 I can raise an event. In MainForm, any events are
available in the vb window, and all is fine.
If I use:
Private WithEvents OtherForm as Form
and then open the form with:
Set OtherForm As New Form1
I can't raise an event in MainForm from Form1, and the event isn't available
in the vb window.
Is it possible to have multiple forms raising the same event within my first
form? I know I could do this by multiple declarations, but is this the only
way?
Thanks in advance.
swas