Windows Develop Bookmark and Share   
 index > Windows Forms General > Include a Form in another form at startup
 

Include a Form in another form at startup

I've two win-Forms in my solution and I wanna use one of them in another one when my application runs (as tabbed page or ...).
how to do this?
There is no fun like C#!
Mobin.seven  Friday, September 18, 2009 4:45 AM

One way would be to create first form as MDI Form and create second form as it's child.


http://msdn.microsoft.com/en-us/library/d4dabts7(VS.80).aspx


Gaurav Khanna
Khanna Gaurav  Friday, September 18, 2009 6:54 AM
  Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.IsMdiContainer = True

        Dim ChildForm As New Form2
        ChildForm.MdiParent = Me
        ChildForm.WindowState = FormWindowState.Maximized
        ChildForm.Show()
    End Sub

VB.NET to C# http://www.developerfusion.com/tools/convert/vb-to-csharp/
Se3ker385  Friday, September 18, 2009 6:54 AM

One way would be to create first form as MDI Form and create second form as it's child.


http://msdn.microsoft.com/en-us/library/d4dabts7(VS.80).aspx


Gaurav Khanna
Khanna Gaurav  Friday, September 18, 2009 6:54 AM
  Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.IsMdiContainer = True

        Dim ChildForm As New Form2
        ChildForm.MdiParent = Me
        ChildForm.WindowState = FormWindowState.Maximized
        ChildForm.Show()
    End Sub

VB.NET to C# http://www.developerfusion.com/tools/convert/vb-to-csharp/
Se3ker385  Friday, September 18, 2009 6:54 AM

You can use google to search for other answers

Custom Search

More Threads

• MonthCalendar - Color Control
• Identity Insert Problem
• Help about IME of UserControl
• multiple tables in datagrid - update statement
• Can calls to BeginUpdate()/EndUpdate() be nested?
• How to change the DataGridView's private field dataConnection
• Adding menus to ApplicationDesktopToolbar
• Custom context menus?
• Export Gridview in Excel Format
• Display properties not working