L
lemonvital
i have a main form and i want to ada a childform,so i do it with the way
such as me.controls.add
code :
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
If IsNothing(lead) Then
lead = New lead
lead.TopLevel = False
Me.Controls.Add(lead)
lead.Top = (Me.Height - lead.Height) / 2
lead.Left = (Me.Width - lead.Width) / 2
lead.Show()
Else
If lead.IsDisposed Then
lead = New lead
lead.TopLevel = False
Me.Controls.Add(lead)
lead.Top = (Me.Height - lead.Height) / 2
lead.Left = (Me.Width - lead.Width) / 2
lead.Show()
Else
lead.Activate()
lead.WindowState = FormWindowState.Normal
End If
End If
End Sub
but someting happen when i open childform,i can't edit the content of
textbox as well as usually.you copy the code to do ,you will find the
problem. can someboxy help me ? why this happen and how to solute?
such as me.controls.add
code :
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
If IsNothing(lead) Then
lead = New lead
lead.TopLevel = False
Me.Controls.Add(lead)
lead.Top = (Me.Height - lead.Height) / 2
lead.Left = (Me.Width - lead.Width) / 2
lead.Show()
Else
If lead.IsDisposed Then
lead = New lead
lead.TopLevel = False
Me.Controls.Add(lead)
lead.Top = (Me.Height - lead.Height) / 2
lead.Left = (Me.Width - lead.Width) / 2
lead.Show()
Else
lead.Activate()
lead.WindowState = FormWindowState.Normal
End If
End If
End Sub
but someting happen when i open childform,i can't edit the content of
textbox as well as usually.you copy the code to do ,you will find the
problem. can someboxy help me ? why this happen and how to solute?