Solved

Splitter

Posted on 1998-08-05
6
326 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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

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…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

762 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

22 Experts available now in Live!

Get 1:1 Help Now