|
-
Sep 6th, 2000, 12:26 PM
#1
Thread Starter
Member
does anyone know how to display a visual activex control dynamically at runtime. I have tried using the CreateObject() method and this created an instance of the control, but there was no way i could display the control on a form. Remember i want to do this all at runtime so i dont want to set any references to the control in the development IDE. I.e i want to use late-binding to display the control.
Thanks alot
-
Sep 6th, 2000, 12:50 PM
#2
Monday Morning Lunatic
Try using the SetParent function:
Code:
Declare Function SetParent Lib "user32" Alias "SetParent" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
Then, use the ShowWindow function on it:
Code:
Declare Function ShowWindow Lib "user32" Alias "ShowWindow" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Sep 6th, 2000, 01:04 PM
#3
Thread Starter
Member
How exactly would i use this code with an activex control?
-
Sep 6th, 2000, 02:15 PM
#4
Monday Morning Lunatic
You'd need to supply the hWnd of the control. However, if this property is not available from the control, I don't think there is a way. Although if anyone with VB6 knows if the new dynamic-creation method will work in this case...
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|