Results 1 to 4 of 4

Thread: SetParent: whats the hell???

  1. #1

    Thread Starter
    Member
    Join Date
    May 2000
    Posts
    32
    hi!
    I use API function SetParent:

    SetParent combobox1.hWnd, form1.hWnd

    after that combobox appears simple message window... ((

  2. #2
    Guest
    Works fine for me...Try this example: Add the following code to a Form with a ComboBox (Combo1), PictureBox (Picture1), and a CommandButton (Command1).

    Make sure Combo1 is drawn inside the PictureBox (so it's parent is Picture1).

    Code:
    Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
    
    Private Sub Command1_Click()
        SetParent Combo1.hWnd, Form1.hWnd
    End Sub

  3. #3

    Thread Starter
    Member
    Join Date
    May 2000
    Posts
    32
    yes... strange... it workes in new project for me to...
    ok... thanks... i'll try to find whats wrong in my app...

  4. #4
    Guest
    Maybe it's some of your other code that causes conflicts with this code?

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