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
Solved

Splitter

Posted on 1998-08-05
6
331 Views
Last Modified: 2010-05-03
I have a MDI form. On the left of it I have a picturebox that serves as toolbar. On the right side I have several Childforms.
How can I make a splitter to size my toolbar as in VB5?
0
Comment
Question by:ndb
  • 2
  • 2
  • 2
6 Comments
 
LVL 6

Expert Comment

by:anthonyc
ID: 1467961
ok this is pretty easy to do:

I've implemented it with a frame, but that will not work on an MDI form.  Use a picturebox.... it'll still work.  Here is the source I used for the frame:

private m_bMoving as boolean
Private Declare Function SetCapture Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function ReleaseCapture Lib "user32" () As Long

Private Sub fraSplit_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Button And vbLeftButton Then
        SetCapture fraSplit.hwnd
        m_bMoving = True
    End If
End Sub

Private Sub fraSplit_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Static bWorking As Boolean
   
    If Not bWorking Then
        bWorking = True
        With fraSplit
            If m_bMoving Then
                .left = .Left + X
            End If
        End With
        bWorking = False
    End If
End Sub

Private Sub fraSplit_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If m_bMoving Then
        ReleaseCapture
    End If
    m_bMoving = False
End Sub

0
 
LVL 1

Expert Comment

by:batdan
ID: 1467962
Also - Need any extra code?  Check this out:

http://www.mvps.org/vbnet/code/neet/splitterbar.htp
0
 
LVL 1

Expert Comment

by:batdan
ID: 1467963
Sorry:  splitterbar.htm not .htp
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 1

Author Comment

by:ndb
ID: 1467964
This doesn't work with an MDI Form.
0
 
LVL 6

Accepted Solution

by:
anthonyc earned 200 total points
ID: 1467965
sure it does... You can not use a FRAME you replace the frame with a picture box.  Give me your email address, and I'll show you.

Anthony
0
 
LVL 1

Author Comment

by:ndb
ID: 1467966
NicoD@carleton.be
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MsgBox 2 59
Access 2013 combo box not working 3 51
checkbox to hide entire section 10 41
Collapse and expand table in Word 2010 2 32
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

856 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