|
-
Oct 6th, 2003, 01:22 PM
#1
Thread Starter
New Member
Adding ActiveX dynamically
Hi guys. I'm trying to add an activex control (.ocx) dynamically to a form, but without success. I know that i can do that by adding the control in the toolbox and the dragg it to the form but i want to ad the control at run time. I found a way for VB 6 but dose not work in VB .Net.
Any ideas?
Thanks.
-
Oct 6th, 2003, 01:54 PM
#2
The problem is that when you drag it on to the .NEt form then it creates a .NET wrapper so you can use the ActiveX object in .NET, but at runtime this doesn't happen. You may need to already have the wrapper file in the app folder or try using CreateObject which I believe is specifically for ActiveX/COM objects.
-
Oct 6th, 2003, 02:29 PM
#3
Sleep mode
I doubt that but I believe , Reflections class can expose external Dll or OCX libraries methods at runtime but not setting the control itself at runtime without referencing it first .
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
|