Solved

How to hide an existing module!

Posted on 1998-10-27
11
148 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
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
 

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

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
DIR issue 7 54
VB 6.0 printer how to align 6 62
Excel - Save a copy of work book 13 85
VBA - If Bookmark = "XXBOOKMARKXX" then 15 29
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

831 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