Results 1 to 14 of 14

Thread: how to group controls using Panel control?

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2005
    Posts
    4

    how to group controls using Panel control?

    i want to group some controls using panel control, the problem is i don't know where is the Panel Control? i can't find it on the toolbar
    i use Visual basic 6.0
    if u suggest another control to group these controls tell me!
    thanks

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: how to group controls using Panel control?

    Hi mesh2005, welcome to VBForums!

    I think you want the Frame control, which should be on your toolbox already (it looks like a square with XY written at the top).

  3. #3
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: how to group controls using Panel control?

    is i don't know where is the Panel Control?
    Just wanted to point out that the Panel Control or SSPanel came out about 10-12 years ago. It can be found by adding the Sheridan 3D Controls component to your project (Threed32.ocx). I think the OCX is still shipped with VB6.

    Although, as already suggested use the Frame Control.

  4. #4
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: how to group controls using Panel control?

    You can also use a PictureBox as a container, if you don't want the frame a Frame control has.

  5. #5
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: how to group controls using Panel control?

    Or if your coming from a .NET environment to VB6 then there is no Panel control in VB6 by default.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  6. #6
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    Re: how to group controls using Panel control?

    Personally, I find the PictureBox to be best for a container. It is more flexible than Frame.

  7. #7
    PowerPoster
    Join Date
    Feb 2002
    Location
    Canada, Toronto
    Posts
    5,803

    Re: how to group controls using Panel control?

    Quote Originally Posted by baja_yu
    Personally, I find the PictureBox to be best for a container. It is more flexible than Frame.
    Same here

  8. #8
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: how to group controls using Panel control?

    How so?

  9. #9
    PowerPoster
    Join Date
    Feb 2002
    Location
    Canada, Toronto
    Posts
    5,803

    Re: how to group controls using Panel control?

    Quote Originally Posted by dglienna
    How so?
    Well, most of times, I don't want that border that the frame has... most times I don't any border at all, and sometimes I want a simple border like when setting the picturebox.Appearance = "0 - Flat"

    I very rarely use the frame, in 99% of cases I use the picturebox.

  10. #10
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: how to group controls using Panel control?

    The frame control can also be set to "no border" and appear flat or invisible just as the pb can. Plus, the frame control is a bit lighter then the heavy picturebox control.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  11. #11
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: how to group controls using Panel control?

    I've never used a picturbox as a frame, but have set No Border in the frame many times. Any other characteristics that might make one better than the other? (other than lightweight)

  12. #12
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: how to group controls using Panel control?

    A frame doesnt have a .hDC and an picturebox does. Depending on the situation and what your trying to accomplish, it would relevant.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  13. #13
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: how to group controls using Panel control?

    Well.... (dot dot dot).... A frame does have a hWnd... But then again a frame does't respont to any messages sent to that hWnd. Just try to put a control on a Frame, and then try to get it to respond to some XP frameworks... Or just try it to return a hDC by calling GetDC... Okidoki, you get a return value, now use any GDI functions on that DC.. Nothing happens!

    The VB Frame control is not a normal control, it's not based on any Windows controls at all... Just try this: During the MouseDown event, call ReleaseCapture, then send the WM_NCLBUTTONDOWN message with HTCAPTION as the hit test message...

    Doing this with any other control (with a hWnd) would let you move it around within the container it belongs to (which would be to Form)... But sending this message to a frame will give you the same result as to ask a bum to move to another neighbourhood.

  14. #14
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    Re: how to group controls using Panel control?

    Quote Originally Posted by Joacim Andersson
    But sending this message to a frame will give you the same result as to ask a bum to move to another neighbourhood.
    It's funny because it's true!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width