Results 1 to 4 of 4

Thread: Dll Help!!!

  1. #1

    Thread Starter
    Addicted Member Stick's Avatar
    Join Date
    Aug 1999
    Location
    Iowa
    Posts
    152

    Dll Help!!!

    I made a dll using VB.NET and in the dll i had a Usercontrol how can i go about showing the UserControl in a seperrate program.
    I know how to add dll's to the program but wondered if i could show the UserControl i made. It is like a form with textbox's and buttons etc

  2. #2
    Registered User
    Join Date
    Mar 2002
    Location
    Nashville, TN
    Posts
    103
    if the project type you selected was a "UserControl" then it should have compiled an OCX instead of DLL. To my knowledge, I don't think you could access the user control unless you compiled it as an OCX. Once it's an OCX, all you should have to do is register it and then add it to your toolbox by rightclicking on the toolbox and selecting "Customize Toolbox".

  3. #3
    Fanatic Member VBCrazyCoder's Avatar
    Join Date
    Apr 2003
    Posts
    681
    If you compile your custom control into a dll you can then add the custom control(s) contained within it to the toolbox and then you can drag and drop the controls onto your forms - and actually see the controls.

    To add the control to the toolbox, you can right click in the toolbox and select Customize Toolbox. Then select the .NET Framework Components tab and Browse to your DLL. Double click on your Dll and the components are added to the list with check marks. Click OK and then you will be able to see the custom controls in the toolbox.

    Hope this helps,

    --Darrel

  4. #4
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Originally posted by smcgarry
    if the project type you selected was a "UserControl" then it should have compiled an OCX instead of DLL. To my knowledge, I don't think you could access the user control unless you compiled it as an OCX. Once it's an OCX, all you should have to do is register it and then add it to your toolbox by rightclicking on the toolbox and selecting "Customize Toolbox".
    OCX's are VB6, .Net does not work the same. You compile your control to a dll, then you reference that control.

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