Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Need some newbie C# help. Need dock a form to another form.

Need some newbie C# help. Need dock a form to another form.

Scheduled Pinned Locked Moved C#
csharpcomhelpquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Derek Smigelski
    wrote on last edited by
    #1

    I create an app in C# and put my controls on right side. I intend to dock an Outlook type toolbar on the left. So inside the development I have two forms My original form NHN.cs and my outlook bar called OLBar.cs I want to doc the OLBar.cs to the left side of NHN.cs. 1) How is this accomplished. 2) The Outlook Bar code that I download from http://www.codeproject.com/cs/miscctrl/outlookbar.asp seems to be a nice toolbar but for the life of me I can't get that docked to the left onto my NHN.cs form. Has anyone used this Outlook toolbar that might be able to offer some help OR does anyone know another way to add an outlook toolbar on a form? Many Thanks, Derek Derek@NeedHelpNow.com

    G L 2 Replies Last reply
    0
    • D Derek Smigelski

      I create an app in C# and put my controls on right side. I intend to dock an Outlook type toolbar on the left. So inside the development I have two forms My original form NHN.cs and my outlook bar called OLBar.cs I want to doc the OLBar.cs to the left side of NHN.cs. 1) How is this accomplished. 2) The Outlook Bar code that I download from http://www.codeproject.com/cs/miscctrl/outlookbar.asp seems to be a nice toolbar but for the life of me I can't get that docked to the left onto my NHN.cs form. Has anyone used this Outlook toolbar that might be able to offer some help OR does anyone know another way to add an outlook toolbar on a form? Many Thanks, Derek Derek@NeedHelpNow.com

      G Offline
      G Offline
      Gaul
      wrote on last edited by
      #2

      You basically need to use the DockStyle to position elements on a container type object. You could create a panel to host your forms. Assuming Form1 is the one you want on the right side, you could do something like this: panelRight = new Panel(); panelRight.Dock = DockStyle.Fill; form1 = new Form1(); form1.Parent = panelRight; panelLeft = new Panel(); panelLeft.Dock = DockStyle.Left; splitter1 = new Splitter(); this.Controls.AddRange(new System.Windows.Forms.Control[] {panelRight, splitter1, panelLeft}); The order of adding things to this.Controls above is important. panelLeft could be the parent of your Outlookbar control. Gaulles http://www.gaulles.com

      1 Reply Last reply
      0
      • D Derek Smigelski

        I create an app in C# and put my controls on right side. I intend to dock an Outlook type toolbar on the left. So inside the development I have two forms My original form NHN.cs and my outlook bar called OLBar.cs I want to doc the OLBar.cs to the left side of NHN.cs. 1) How is this accomplished. 2) The Outlook Bar code that I download from http://www.codeproject.com/cs/miscctrl/outlookbar.asp seems to be a nice toolbar but for the life of me I can't get that docked to the left onto my NHN.cs form. Has anyone used this Outlook toolbar that might be able to offer some help OR does anyone know another way to add an outlook toolbar on a form? Many Thanks, Derek Derek@NeedHelpNow.com

        L Offline
        L Offline
        Luis Alonso Ramos
        wrote on last edited by
        #3

        Derek Smigelski wrote: Has anyone used this Outlook toolbar that might be able to offer some I have used it. I use a panel (which I can change) that fills all the client area of my main window (panel.Dock = DockStyle.Fill). Then I create a Splitter, assignig its parent as the main form, and set its Dock property to DockStyle.Left. Finally I create the outlook bar, I assign its parent as the main form, and set its Dock property again to DockSytle.Left. And there, you have a resizable Outlook bar on the left. -- LuisR ──────────────   Luis Alonso Ramos   Chihuahua, Mexico   www.luisalonsoramos.com "Do not worry about your difficulties in mathematics, I assure you that mine are greater." -- Albert Einstein

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups