Results 1 to 6 of 6

Thread: User Controls

  1. #1

    Thread Starter
    Frenzied Member vbgladiator's Avatar
    Join Date
    May 2001
    Posts
    1,950

    User Controls

    Hey,

    Can I use a user control created in VB.NET in VB6?

    Thanks,
    Don't anthropomorphize computers -- they hate it

  2. #2
    Hyperactive Member CyberHawke's Avatar
    Join Date
    May 2004
    Location
    Washington DC
    Posts
    477
    Yes, but the control must be created as an ActiveX component, this article will guide you through the process, it's actually pretty simple.

    Write an ActiveX control in .NET
    Whadayamean it doesn't work....
    It works fine on my machine!

  3. #3
    Hyperactive Member CyberHawke's Avatar
    Join Date
    May 2004
    Location
    Washington DC
    Posts
    477
    Actually after further research, I have discovered that this is not possible. I worked with my own version and delved deeper than that article covers and could not get it to work.

    Upon further research I bumped into this article:
    DOTNET Archives

    Sorry for that...
    Whadayamean it doesn't work....
    It works fine on my machine!

  4. #4

    Thread Starter
    Frenzied Member vbgladiator's Avatar
    Join Date
    May 2001
    Posts
    1,950
    You can check the REgister for Com Interop checkbox under build options in the properties of the project.
    However, that only creates a .tlb file that can be referenced in vb 6.

    I want to be able to drop the control onto a form like I can in vb.net.

    Anyone?

    Thanks,
    Don't anthropomorphize computers -- they hate it

  5. #5
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    As far as I know , .NET Controls and wrapped .NET Controls can be hosted only on Windows Forms inherited from System.Windows.Forms namespace (on .NET forms) .

  6. #6
    Hyperactive Member CyberHawke's Avatar
    Join Date
    May 2004
    Location
    Washington DC
    Posts
    477
    It is not possible at all, the last article I sent explains that Microsoft made the decision after beta2 not to support this functionality. Someone out there may have written a C++ library that will support what you are looking for, but it's not possible using just a .NET control and vb 6.
    Whadayamean it doesn't work....
    It works fine on my machine!

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