Hi!
I'm developing a MDI Application called "Main" with at MDI Container form named: "frmMain".
The MDI Childs is referenced and imported as independent projects (.DLLs) because the application is build up by several modules.
The modules consists of forms - reports - classes and so on.
In project "Main"
[add reference] --> "User.dll"
and further in Class frmMain: "Imports User"
To use the login form from frmMain I do:
Dim frm as new User.frmLogIn
With frm
.Name = "Login"
.MdiParent = Me
.Show()
End with
This works fine BUT here comes the headache...
Now I want to post users information back to frmMain's statusbar
But I can't figure out to reference back to frmMains public method:
Public Sub ShowUser(ByVal User as string)
Me.Statusbar1.Text = User
End Sub
It is clear to me that from the User module there is a Me.ParentForm reference but I still can't
cast this particullar reference AS A "frmMain" object.
The "Main" module is a .exe file and therefore I can't make a reference to it (And if I could it would sure give some circular reference problems!)
Is there a way around this!
I would be happy for an answar to this - thanks in advance!
Bomstrong
I'm developing a MDI Application called "Main" with at MDI Container form named: "frmMain".
The MDI Childs is referenced and imported as independent projects (.DLLs) because the application is build up by several modules.
The modules consists of forms - reports - classes and so on.
In project "Main"
[add reference] --> "User.dll"
and further in Class frmMain: "Imports User"
To use the login form from frmMain I do:
Dim frm as new User.frmLogIn
With frm
.Name = "Login"
.MdiParent = Me
.Show()
End with
This works fine BUT here comes the headache...
Now I want to post users information back to frmMain's statusbar
But I can't figure out to reference back to frmMains public method:
Public Sub ShowUser(ByVal User as string)
Me.Statusbar1.Text = User
End Sub
It is clear to me that from the User module there is a Me.ParentForm reference but I still can't
cast this particullar reference AS A "frmMain" object.
The "Main" module is a .exe file and therefore I can't make a reference to it (And if I could it would sure give some circular reference problems!)
Is there a way around this!
I would be happy for an answar to this - thanks in advance!
Bomstrong