Solved

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

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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Step by step guide to Clean and Sort your windows registry! Introduction: Always remember: A Clean registry = Better performance = Save your invaluable time In this article we're going to clear our registry manually! Yes, manually! The e…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

895 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

17 Experts available now in Live!

Get 1:1 Help Now