Click here to Skip to main content
15,884,041 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,
Are there any functions that can be called across the project.
I mean we cn use Private Sub ABC() function in the document where it has been declared but is there any way that this could be called from any other form?
Thanks
Furqan

[edit]Edited for more readible - losmac[/edit]
Posted
Updated 9-Jul-11 6:46am
v2

You have 4 ways to do it:
1) write your class
2) use interfaces[^]
3) use delegates[^]
One of these 3 methods are recomended.
or
4) change visibility of your function removing word "Private", then call it like Form1.ABC() /not recomended/.
 
Share this answer
 
v3
You could use a singleton class using which you can have a single instance that can contain this function.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900