Solved

How Do I Create a Windows Application that Behaves like the Windows in the Visual Studio IDE?

Posted on 2009-07-07
4
212 Views
Last Modified: 2012-05-07
Im in need of creating a Visual Basic windows application that has a main (parent) window with several (child like) sub-windows.  My application needs to mimic the behavior of various windows similar to those used in the IDE of Visual Studio.  For example, in the IDE one can resize the windows, close and open them, and even double click on the title bar to make the window pop out as an independent window.  My question is how should I go about doing this in VB.  Do I use panels?  Do I use MDI parent/child windows?  Is it some combination of the two?  Im looking for an approach to this problem before I begin the development process.
0
Comment
Question by:robtrue
  • 2
4 Comments
 
LVL 27

Accepted Solution

by:
VBRocks earned 500 total points
ID: 24794208
Yes, use an MDI parent/child.  

Create a new Form called "Form1", and copy and paste this code into it:

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, _
                           ByVal e As System.EventArgs) Handles MyBase.Load

        Me.Text = "MDI Demo"
        Me.IsMdiContainer = True
        Me.WindowState = FormWindowState.Maximized

        CreateForm("Form1", DockStyle.Bottom)
        CreateForm("Form2", DockStyle.Left)
        CreateForm("Form3", DockStyle.Right)


    End Sub


    Public Sub CreateForm(ByVal txt As String, ByVal dock As DockStyle)

        Dim frm As New Form()
        frm.FormBorderStyle = Windows.Forms.FormBorderStyle.FixedToolWindow
        frm.Text = txt
        frm.MdiParent = Me
        frm.Dock = dock
        frm.Show()

    End Sub

End Class

0
 
LVL 27

Expert Comment

by:VBRocks
ID: 24794388
0
 
LVL 4

Expert Comment

by:vbgb
ID: 24794674
Using the built in controls in VS 2005 or VS 2008 will not really mimic the VS window behaviour.

For this you need to use tabbed MDI windows and tool windows that will dock inside each other and wich can be pinned open or allowed to automatically collapse. To do this properly you probably need to invest in a 3rd party suite like Infragistics or DevExpress.
0
 

Author Comment

by:robtrue
ID: 24794792
The double click on title bar works, but what about resizing.  For example, in the Visual Studio IDE there are separators between the windows and one can drag the separator to make one window large and the other window smaller.  How does one do that?
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

If you have done a reformat of your hard drive and proceeded to do a successful Windows XP installation, you may notice that a choice between two operating systems when you start up the machine. Here is how to get rid of this: Click Start Clic…
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup". After a while, you have entered a loop for Auto repair which does not fix anything and you will be in a  panic as all your work w…
This video discusses moving either the default database or any database to a new volume.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now