Virtual Developer Workshop: Containerized Development with Docker

Environment VB6

This is a simple User-Control for easily creating a "splitter-window-like" outfit with any two controls on your VB-form.


Steps to generate this:
  1. Place the ctlSplitterEx on your form an size it.
  2. Place two other control on your form which you want to be splitted. The size & position on these controls doesn't matter. They will be resized and placed at runtime so they will hide the cltSplitterEx at runtime nearly completely.
  3. Attach the two controls to the ctlSplitterEx by invoking ctlSplitterEx.AttachObject
  4. Define the TileMode to horizontally/vertically by setting ctlSplitterEx.TileMode - Property. [default: horizontally]
  5. Define the position of the tilebar by setting the ctlSplitterEx.TilePercenze - Property. [default: 30%]

Example to generate a splitter window with a textbox on the right an a button on the left:

private Sub Form_Load()
	me.ctlSplitterEx1.AttachObjects me.Text1, me.Command1, true
	me.ctlSplitterEx1.TileMode = TILE_VERTICALLY
End Sub

If you enjoy this control send me an email.

Download zipped source and demo project (3k)


  • NICE!!!!

    Posted by Evan Toder on 01/19/2017 06:51am

    Controls works perfectly and with very little code.

  • Splitter Control

    Posted by ncampbell on 07/31/2008 05:16pm

    I have an application that was designed by a former employee and I'm only now making changes to it. Randomly (but more often than not) I get an error "Method 'AttachObjects' of object '_ctlSplitterEx' failed" I have googled this error to death and stepped through the program and have found that when I get to the sub procedure "FindOwnInstance" For i = 0 To UserControl.ParentControls.Count - 1 If TypeOf UserControl.ParentControls.Item(i) Is ctlSplitterEx Then <------------------ this is where it errors out! If UserControl.ParentControls.Item(i).hwnd = Myhwnd Then Set m_oMe = UserControl.ParentControls.Item(i) Exit For End If End If Next ------------------------------------------------------ This application has been programmed in VB 6.0 and I'm totally at a loss! Can you help?

  • 3 panel split

    Posted by mocolt on 12/01/2004 09:31am

    How do I make this into 3 panel split? 1 panel on the left and 2 on the left (1 on top of each other). Can someone help me?

  • Excellent

    Posted by Legacy on 10/19/2003 07:00am

    Originally posted by: Brian G

    Works perfectly, top notch stuff, thank you very much!

  • Good Work, but is there a way...

    Posted by Legacy on 10/17/2003 07:00am

    Originally posted by: Peter C

    Good Work, but is there a way to "grab" and show the "dragging" of the splitter while increasing the slitter width? 

    For the moment, you can only grab it, but cannot see the resize bar overtop the controls when positioning. There is no flicking effect...


    Peter C.

  • Just great!

    Posted by Legacy on 09/16/2003 07:00am

    Originally posted by: Roger Paini

    This is great code! Very useful!

  • Control Splitter

    Posted by Legacy on 09/13/2003 07:00am

    Originally posted by: Ramniwas Yadav

    I find it very useful for my Project.

    Thnaks for thi stype of Help

  • How do I do this ...

    Posted by Legacy on 09/10/2003 07:00am

    Originally posted by: eamonn

    I have used your control and like it a lot. In my application I want to split the screen into a left and right section. On the left hand side I want 2 controls, one on top of the other. On the right I just want one control filling the whole height of the application window. I have tried the following...

    Me.ctlSplitterEx1.AttachObjects Me.ctlSplitterEx2, Me.Frame1, True
    Me.ctlSplitterEx2.AttachObjects Me.TreeView1, Me.Frame2, True
    Me.ctlSplitterEx1.TileMode = TILE_HORIZONTALLY
    Me.ctlSplitterEx2.TileMode = TILE_VERTICALLY
    Me.ctlSplitterEx1.TilePercent = 90
    Me.ctlSplitterEx2.TilePercent = 35

    but find that the control that I want to appear in the bottom left corner of the window (frame1) actually appears for the whole width of the window.

  • Splitter Position

    Posted by Legacy on 07/08/2003 07:00am

    Originally posted by: Peter Maslin

    hi there

    Great controll , but how do you get/set the splitter position , i cant find anything in the controll to allow me to set where the splitter bar is.


  • I Have a little problem whit yor control

    Posted by Legacy on 11/08/2002 08:00am

    Originally posted by: Rupelstinsky

    i've already used yor control in several forms but now I'm trying it with a form who has other 30 controls and shows an error on the memory
    Do you know smth about it?

    Thanks in advanced

  • Loading, Please Wait ...

  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date