Click to See Complete Forum and Search --> : SetParent: whats the hell???
arnas
Dec 9th, 2000, 02:14 PM
hi!
I use API function SetParent:
SetParent combobox1.hWnd, form1.hWnd
after that combobox appears simple message window... ((
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).
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
arnas
Dec 10th, 2000, 06:48 AM
yes... strange... it workes in new project for me to...
ok... thanks... i'll try to find whats wrong in my app...
Maybe it's some of your other code that causes conflicts with this code?
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.