Solved

How to hide an existing module!

Posted on 1998-10-27
11
146 Views
Last Modified: 2010-04-30
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
Comment
Question by:bsvarma
  • 6
  • 4
11 Comments
 
LVL 1

Expert Comment

by:wford
ID: 1441760
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
 

Author Comment

by:bsvarma
ID: 1441761
Edited text of question
0
 

Author Comment

by:bsvarma
ID: 1441762
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
 
LVL 1

Expert Comment

by:wford
ID: 1441763
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
 
LVL 1

Expert Comment

by:wford
ID: 1441764
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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

Author Comment

by:bsvarma
ID: 1441765
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
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1441766
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
 
LVL 1

Expert Comment

by:wford
ID: 1441767
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
 
LVL 1

Expert Comment

by:wford
ID: 1441768
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
 

Author Comment

by:bsvarma
ID: 1441769
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
 
LVL 1

Accepted Solution

by:
wford earned 50 total points
ID: 1441770
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now