Results 1 to 3 of 3

Thread: Adding ActiveX dynamically

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2003
    Posts
    2

    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.

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    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.

  3. #3
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    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
  •  



Click Here to Expand Forum to Full Width