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

Implementing Application with single GUI in Visual Basic.Net 2.0

Author: Zunnair

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

Add Article Comment:
Name :
Email Address :
Comments :
<< Implementing Custom Window Controls using .net 2.0

Disclaimer - Privacy
© 2002-2017