Hi All,
I have tried to get answers on different forums so some of you may have already seen this before.
What I have is a Single Solution with 2 Class Libraries. In ClassLibrary 1 I have 2 Forms, Background and OpenSplash. Background is an MDIParent and OpenSplash a Child with a Button. In Background I have the following code;
Public Class Background
Private Sub Background_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Dim ChildForm As New OpenSplash
ChildForm.MdiParent = Me
ChildForm.Show()
End Sub
End Class
and in OpenSplash I have the following code;
Public Class OpenSplash
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim Form1 As New ClassLibrary2.Form1
form1.MdiParent = Background
form1.Show()
Me.Hide()
End Sub
End Class
ClassLibrary2 has a single form Form1 with a Button.
Now when I run this and click the Button on OpenSplash that form dissapears and Form1 is shown. What I cannot seem to be able to do is click the Button on Form1 and for that to close/hide and OpenSplash to show up again.
I have also tried to do this with a Single Solution that has 2 Projects instead of Class Libraries, but still cannot get it to work.
This is the part where I need help. I'm sure that there is a solution to this problem so if anyone can offer some code that will do this operation I would be extreemly appreciative.
Best Rgds,
Tarablue
I have tried to get answers on different forums so some of you may have already seen this before.
What I have is a Single Solution with 2 Class Libraries. In ClassLibrary 1 I have 2 Forms, Background and OpenSplash. Background is an MDIParent and OpenSplash a Child with a Button. In Background I have the following code;
Public Class Background
Private Sub Background_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Dim ChildForm As New OpenSplash
ChildForm.MdiParent = Me
ChildForm.Show()
End Sub
End Class
and in OpenSplash I have the following code;
Public Class OpenSplash
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim Form1 As New ClassLibrary2.Form1
form1.MdiParent = Background
form1.Show()
Me.Hide()
End Sub
End Class
ClassLibrary2 has a single form Form1 with a Button.
Now when I run this and click the Button on OpenSplash that form dissapears and Form1 is shown. What I cannot seem to be able to do is click the Button on Form1 and for that to close/hide and OpenSplash to show up again.
I have also tried to do this with a Single Solution that has 2 Projects instead of Class Libraries, but still cannot get it to work.
This is the part where I need help. I'm sure that there is a solution to this problem so if anyone can offer some code that will do this operation I would be extreemly appreciative.
Best Rgds,
Tarablue