how can i hide forms and classes

Hi Everyone,
i need help with the following project:

The project was originally in vb6 and I have converted it into 2008, it has many classes(modules) and forms, and the client wants to sell it, so others can make something out of it. However they only want others (buyers) to see one class and everything else hidden. He wants to sell the source code only to one class which is the main one, and does not want them to see the forms and other classes.

Buyers can modify and make the source their own to a certain extend, by only modifying one class.

I was thinking if I create another project and add all the other classes and forms in it, build it, which it then creates a dll file, and then reference that dll file into the main project leaving everything else hidden from the buyer.

I am not an expert in programming my knowledge is limited, this may not be the best idea of doing it, however if anyone else has a better idea I'm willing to listen and give it a try.

Please help
Thanks in advance


  • seancampbellseancampbell Pennsylvania, USA
    In a professional environment, you would do something very similar to what you are thinking.

    Firstly, you need to organize your code files and extract all functions and subroutines and classes that the code you want to expose uses... Put those into their own code file, compile that. Next include the DLL for those "needed" functions to a new project and add in the code you would like to expose for them to edit. Everything else you want hidden should simply not be included in the project.

    I believe you can designate forms and modules to not compile during build-time, but I have never done it and am only 70% sure you can.

    Anything Public that you include in the DLL will be usable, but they will not be able to see the code contained there in.

    Hope this helps,
    Sean Campbell
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion