Results 1 to 2 of 2

Thread: usercontrol problems

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 1999
    Location
    Oak Park, IL, USA
    Posts
    43

    usercontrol problems

    I have a usercontrol that has picture boxes on it. The usercontrol has the property ControlContainer set to true. I want to be able to (just like on a form) drop a control on a picturebox in the usercontrol, and have that picturebox contain the control. not the usercontrol. This is so I can hide the picturebox and any controls contained within it all get hidden to.

    Ive seen this capability in many other active X controls (able to drop controls onto the activex, and have the control be contained by a container within the control instead of the usercontrol itself.

    Im thinking that this might mean me having to implement the ISimpleFrame interface myself. Just dont know what to do.

    Gregg

  2. #2
    Frenzied Member
    Join Date
    Aug 2001
    Posts
    1,075
    I've only written two UserControls so I may not be the best person to answer this question. My first thought was the SetParent API

    Declare Function SetParent Lib "user32" Alias "SetParent" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long

    Call SetParent(Child.hWnd, Parent.hWnd)

    Greg

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