Results 1 to 5 of 5

Thread: question about dll and ocx

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    May 2013
    Posts
    1,126

    question about dll and ocx

    In vb6 I know how to create dll and ocx and how to compile then and use them on the project references but I dont know the following in vb.net:

    a. how to create ocx or do we need to create ocx on NET
    b. how to use dll or ocx as reference on the NET project

    Please kindly clarify me on this two issues that I dont know. Thank you. I am new to NET.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: question about dll and ocx

    God damn it! I specifically told you in your other thread that I had asked the mods to move that thread. You've posted in the wrong forum and now you've compounded that error by posting a duplicate thread. A fine days work. I guess now I'll ask the mods to delete your other thread. I've got nothing better to do.

    Anyway, you don't create OCXs in .NET. An OCX is an ActiveX control and ActiveX controls are specifically a COM technology. If you want to create a DLL then you create a Class Library project. Unlike an application project, which compiles to an EXE, a library project compiles to a DLL. If you want to create custom controls that you can use in other projects then you should, if possible, create a Windows Forms Control Library project instead. Some versions/editions of VS don't include that project template, but that's no problem. It's not much different to a Class Library anyway. It just has a couple of extra references (System.Drawing, System.Windows.Forms) and the default item template is a UserControl rather than a Class. Those changes can be made manually very easily.

    Just as with any other library, you reference your compiled DLL or, if it's in the same solution, your library project, on the References page of the project properties.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    May 2013
    Posts
    1,126

    Re: question about dll and ocx

    JM, i posted to that other thread that it was an honest mistake coz I did not realize it was in the codebank and I asked for an apology. I hope you accept my apology.

    Thanks for the reply, now I know what is the new description for creating dll and usercontrol.

    Is the coding of dll and usercontrol still the same like vb6?

    I know I ask to much but maybe instead you can provide me a link for a reading. I know there are vast articles on google but maybe yours is a better reading since I am a newbie and I dont know much right now about NET. Thanks
    Last edited by codesearcher; Jun 17th, 2013 at 09:34 AM.

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: question about dll and ocx

    Quote Originally Posted by codesearcher View Post
    JM, i posted to that other thread that it was an honest mistake coz I did not realize it was in the codebank and I asked for an apology. I hope you accept my apology.

    Thanks for the reply.
    I understand that it was an honest mistake but you then compounded it by creating a duplicate thread even after I specifically said that I'd asked the mods to move the existing thread. Anyway, apology accepted, not that you're obliged to apologise to me, and hopefully my previous post has provided you with some useful information.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    May 2013
    Posts
    1,126

    Re: question about dll and ocx

    Quote Originally Posted by jmcilhinney View Post
    I understand that it was an honest mistake but you then compounded it by creating a duplicate thread even after I specifically said that I'd asked the mods to move the existing thread. Anyway, apology accepted, not that you're obliged to apologise to me, and hopefully my previous post has provided you with some useful information.
    yes it did. thanks.

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