Solved

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

Posted on 2009-07-07
4
243 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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

We have adopted the strategy to use Computers in Student Labs as the bulletin boards. The same target can be achieved by using a Login Notice feature in Group policy but it’s not as attractive as graphical wallpapers with message which grabs the att…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

749 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