Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to call a public function from one class to another in vb.net

Status
Not open for further replies.

jpower69

Programmer
Feb 5, 2008
54
US
I have the following windows application that contains several public classes. One class if my login screen where a user enters there ID plus password. In this class I have a public function called get_password which verifies the password just entered.

this is an example of the call within my login_screen "lretval = vfp_2007(tempstr2) << where tempstr2 is the text being passed"
with the variable lretval being the return value

I have another class called user_maintenance where a new user id/password/confirm password can be created.

My question is this how can I call the public function found in my login_screen from my user_maintenance screen??

If is already posted here, please point me to the response

thanks in advance

 

Try creating an instance of your Login_Screen class in the User_Maintenance class, then call the function from the Login_Screen instance.

I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!
 
Sorry i have not replied earlier

I put the routine into my module and i can now call it from various forms withing the application

forgot all about using the module

again thanks for the replies


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top