H.w.Hendrick
New member
- Joined
- Oct 10, 2005
- Messages
- 3
- Programming Experience
- Beginner
VB.NET Mdi project problem
--------------------------------------------------------------------------------
Hey,
I have a simple VB.NET Mdi project problem.
I have two Forms One Parent and One Child.
If i click on the button Open_Mdi_Child, the button disabled, the Child_Form shows and the Text Child_Form wil be appear.
But if i answered on de the Button_Answer in the Childform to the Parent form i see nothing changed in then Statusbox Text and it wil also not reset the show Child button.
Question: What i'm doing wrong and ho has the correct answer please.
Yours sincerelly
H.w. Hendrick
--------------------------------------------------------------------------------
Hey,
I have a simple VB.NET Mdi project problem.
I have two Forms One Parent and One Child.
If i click on the button Open_Mdi_Child, the button disabled, the Child_Form shows and the Text Child_Form wil be appear.
But if i answered on de the Button_Answer in the Childform to the Parent form i see nothing changed in then Statusbox Text and it wil also not reset the show Child button.
Question: What i'm doing wrong and ho has the correct answer please.
Yours sincerelly
H.w. Hendrick
VB.NET:
Public Class Form1
Inherits System.Windows.Forms.Form
Shared Frm_Child As New Form2
#Region " Windows Form Designer generated code "
#End Region
Private Sub Open_Mdi_Child_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Open_Mdi_Child.Click
Open_Mdi_Child.Enabled = False
Frm_Child.MdiParent = Me
Frm_Child.Show()
Frm_Child.TextBox_Mdi_Child.Text = "Nano Nano, Form1 is calling Form2"
End Sub
End Class
Public Class Form2
Inherits System.Windows.Forms.Form
Shared Frm_Parent As New Form1
#Region " Windows Form Designer generated code "
#End Region
Private Sub Form2_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Resize
Me.ControlBox = False
Me.WindowState = FormWindowState.Maximized
End Sub
Private Sub Button_Answer_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button_Answer.Click
Frm_Parent.Frm_1_StatusBar.Text = "Hello Form1, Thanks for calling"
Frm_Parent.Frm_1_StatusBar.Refresh()
End Sub
Private Sub Close_Mdi_Child_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Close_Mdi_Child.Click
Me.Close()
Frm_Parent.Open_Mdi_Child.Enabled = True
End Sub
End Class
Last edited by a moderator: