L
Liz
In VB.NET I add user defined controls to the main panel
of a form :-
Dim controlInfo As MainTemplate
controlInfo = New Details
controlInfo.Dock = DockStyle.Fill
' remove the old one if one already on display
If pnlMain.Controls.Count > 0 Then
pnlMain.Controls.RemoveAt(0)
pnlMain.Controls.Add(controlInfo)
End If
pnlMain.Visible = True
How do I do the same in C# .NET?
Liz
of a form :-
Dim controlInfo As MainTemplate
controlInfo = New Details
controlInfo.Dock = DockStyle.Fill
' remove the old one if one already on display
If pnlMain.Controls.Count > 0 Then
pnlMain.Controls.RemoveAt(0)
pnlMain.Controls.Add(controlInfo)
End If
pnlMain.Visible = True
How do I do the same in C# .NET?
Liz