Results 1 to 5 of 5

Thread: SSTab use?

  1. #1

    Thread Starter
    Addicted Member aa9gg's Avatar
    Join Date
    Apr 2009
    Location
    Chicagoland
    Posts
    184

    SSTab use?

    Is it possible to place other forms onto a single form using SSTab? I have several forms that I want to combine like this. Ideas?

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: SSTab use?

    Put a frame on each tab of the SSTab control, and assign each form to a specific frame.
    Code:
    Option Explicit
    
    Private Declare Function SetParent Lib "user32" _
    (ByVal hWndChild As Long, _
    ByVal hWndNewParent As Long) As Long
    
    Private Declare Function GetClientRect Lib "user32" _
    (ByVal hWnd As Long, _
    lpRect As RECT) As Long
    
    Private Type RECT
    Left As Long
    Top As Long
    Right As Long
    Bottom As Long
    End Type
    
    Private Sub Command1_Click()
    Form2.Show
    SetParent Form2.hWnd, fraTab1.hWnd
    Form3.Show
    SetParent Form3.hWnd, fraTab2.hWnd
    Form4.Show
    SetParent Form4.hWnd, fraTab3.hWnd
    End Sub
    fraTab1 is a frame on Tab1, fraTab2 is a frame on Tab2 and fraTab3 is a frame on Tab3

  3. #3

    Thread Starter
    Addicted Member aa9gg's Avatar
    Join Date
    Apr 2009
    Location
    Chicagoland
    Posts
    184

    Re: SSTab use?

    Very nice....works well. Now how can I set the "tabbed" form to fit the frame?

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: SSTab use?

    Quote Originally Posted by aa9gg View Post
    Very nice....works well. Now how can I set the "tabbed" form to fit the frame?
    I'm not sure I quite understand what you mean.

  5. #5

    Thread Starter
    Addicted Member aa9gg's Avatar
    Join Date
    Apr 2009
    Location
    Chicagoland
    Posts
    184

    Re: SSTab use?

    ok....I have the tabs setup with a frame for each tab, and a form assigned to each frame (just like your code). The problem is that the forms do not fill the entire area of the frame. How do I force the assigned form to "fill" the entire frame? Know what I mean?

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