Solved

How to hide an existing module!

Posted on 1998-10-27
11
150 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to create a duplicate finder Application 9 127
Windows 10 start screen issues 9 61
VB6 - Convert HH:MM into Decimal 8 70
Spell Check in VB6 13 137
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

749 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