• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 155
  • Last Modified:

How to hide an existing module!

I am currently using a module. which i do not want to see in the project explorer of my project.I can do it using an activexdll but i do not what to do so. i just want to hide the existing general module and use it in my current project.how shall i do that.
0
bsvarma
Asked:
bsvarma
  • 6
  • 4
1 Solution
 
wfordCommented:
You want to remove this modual, or just not be able to see it?

If its just a mater of second mouse clicking on the item and selecting remove!
0
 
bsvarmaAuthor Commented:
Edited text of question
0
 
bsvarmaAuthor Commented:
The thing is i  do not want to remove the module but i want to use it in my project without showing it to others. can u do that.
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
wfordCommented:
Uhmmm, Why?

If it is because you do not want to edit of change this module, you can set the file (.bas) as read only either with the Explorer (or using sourcesafe if you have that)

this will stop any changes, but you will still be able to see and copy the code.
0
 
wfordCommented:
Unless you set it up as a dll, which you have noted you do not want, I don't see how you can do this, the VB project window is set up to precisly to allow you to see all code and UI's that you use, editing the vbp or the module attributes will also not allow this.

Someone else may have a solution, but it could be something like messing with VB project window treeview and removing the node object for your module thru some API's. I would not do it though :)
0
 
bsvarmaAuthor Commented:
I will tell u the exact reason behind hiding this module. we r giving our project setup to our clients and in that project  we r supporting some functionality to both vb-5 files and vb-4 *.vbp files. an activexdll does not support vb-4 files. due to this reason  in our project i am dynamically adding the module to the clients selected project.. so i just do not want to give my code to the client. so do u have a reason for that. any way thanku for u'r cooperation
0
 
MirkwoodCommented:
No, you cannot hide a module from the project explorer.
The only way to do it is to compile the code in a dll and reference it from the project.
0
 
wfordCommented:
The only other solution I can suggest is to compile this module as a straight dll not an activeX dll, which the OLE can handle in VB4, you may have to port the modules functions into C++ or another dll language in order to do this, and there may be a code converter, but I don't know of it.
Sorry I can't be more help.
0
 
wfordCommented:
Hang on, just found something, an activeX dll will not work but a dummy (ie. invisible) usercontrol will work with VB4, try it out!
0
 
bsvarmaAuthor Commented:
Mr. wford thanku for u'r help in giving me the suggesstion. i am satisfied with u'r answer one thing i was not able to understand is that u told me to do it using a dummy control which is not visible how shall i do that. how can i keep a dummy control in my project and assign code to it. please help. i am interested in giving full marks to u but i think it is possible only if u send me it as an answer rather than comment right.
0
 
wfordCommented:
no problems,
You set up an activeX user control, using the activeX Wizard , into which you set your public functions, and map them to the usercontrol. these will now be able to be referanced thru the usercontrol as MyControl.Myfunction.

In the usercontrols property box, you set InvisableAtRuntime to true. Then compile

On your main project, you get the usercontrol component and place it on a form as you would a timer or other invisible control.  

Then You can referance it as MyControl.Myfunction although you can declare a global control and set gControl = MyControl and referance the controls functions anywhere in the project (as long as the form that holds it is still loaded)

If you need more detail, just ask
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 6
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now