Solved

VB.NET Navigation Panel

Posted on 2012-03-15
2
1,667 Views
Last Modified: 2012-03-16
Hi there,

I have been searching high and low for a solution to what seems like a standard layout for a navigation pane. I have managed to obtain outlook 'accordion' style navigation panes from around the net.

The one I am currently using is from http://www.codeproject.com/Articles/43181/A-Serious-Outlook-Style-Navigation-Pane-Control and it works really well. The problem I have is that I would like to have a pane or split container to the right of the pane of which will display the appropriate form that I code it to display on click. The same way outlook works when you click calendar or contacts etc.

Please, please can someon point me in the right direction. I have managed to change the panel to show the form but don't know how to dispose of the old form when another button is clicked?

    Private Sub VButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles VButton1.Click
        Dim frm As New Form1

        frm.TopLevel = False
        frm.Parent = Me.Panel1
        frm.Show()

        frm.Show()
    End Sub

    Private Sub VButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles VButton2.Click

        Me.Panel1.Controls.Remove(Form1)
        Dim frm2 As New frmBlank

        frm2.TopLevel = False
        Me.Panel1.Controls.Add(frm2)
        frm2.Show()

        frm2.Show()
    End Sub

Open in new window


I am sure there is a proper way of having a panel that changes according to the button that been clicked from my navigation form. Basically if you look at a tabbed website or even ms access 2010's navigation pane is what I am looking for? Your help is much appreciated
0
Comment
Question by:databarracks
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 310 total points
ID: 37726099
>Me.Panel1.Controls.Remove(Form1)

Is that not working? Where did the Form1 come from?

One option is to do

Me.Panel1.Controls.Clear()

The other is to keep a class level reference of current form and dispose it before showing a new one.
0
 

Author Comment

by:databarracks
ID: 37728377
The clear method works:) Thank you very much. Would you know of a sample app available that works in the manner that I mentioned in my original post?
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

730 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