Search - Articles
DevASP.NET for ASP.NET, VB.NET, XML and C# (C-Sharp) Developers Tuesday, March 03, 2009
Dev Articles
Search Directory
SQL Server

How to make Single GUI Application in VB.Net

Author: DevASP
Download Source Code :

In Professional Application we need to make container Forms because Professional Application always need a single Graphical User Interface.

When you run your application Always Container Form run first And all other forms are Open inside the validate Portion of Container form. All menu Items of child forms are display in menu of Container form. And when you close your application. You just close the container form all other child forms automatically close.


#Region " Global Form "

'Copy this Region on every Form you wish to be accessed globally

'Just rename the Form1 to the name of your Form

Private Shared m_GlobalForm As Form1

Public Shared Property GlobalForm() As Form1


If m_GlobalForm Is Nothing OrElse m_GlobalForm.IsDisposed Then

m_GlobalForm = New Form1

End If

Return m_GlobalForm

End Get

Set(ByVal Value As Form1)

m_GlobalForm = Value

End Set

End Property

#End Region


If you want to call any other form then use these line of code


1-Dim frm As New Form2

2-frm.MdiParent = Me



Line no 2 shows that your calling form is child of parent form. Because of this attitude form always appear inside the Container form. Code is given by this article which helps

Article Comments
hello, this information is useful to me... but i expect more than this... my main doubt is, if one child is active in a project, i need to open another child from the parent menu.. but now the new child is open in top of the existing child. i need to close the existing child automatically while open a new child.. only one child form is active at a time... this is my need. pls send me a brief reply abt this doubt... pls send with corresponding code...

Thank u...


Posted on 4/20/2007 5:32:06 AM by S. Nagarajan

Add Article Comment:
Name :
Email Address :
Comments :
<< How to Change Transparency level of Your Form Using VB.Net

Disclaimer - Privacy
© 2002-2018