Disasterpiece Posted April 21, 2003 Posted April 21, 2003 I have a login form with username and PW textboxes and I want to pass the username into a variable on another form. However when I try to test to make sure it's working it outputs nothing in my test label. I have my Username Textbox set to public so I don't know why this isn't working... Here is my code, what's wrong!!? Public frmLoginInstance As New frmLogin() Public strUsername As String = CStr(frmLoginInstance.txtUserName.Text) Thanks Quote
Moderators Robby Posted April 21, 2003 Moderators Posted April 21, 2003 You can create a Public Property to Set/Get the username. Place this Property either in a new class or in your main form. Quote Visit...Bassic Software
Disasterpiece Posted April 21, 2003 Author Posted April 21, 2003 So if I did a class with just a property for the Username, and then instantiated an object as that class type, and then set the username property of the object to CStr(frmLoginInstance.txtUsername.Text) it would work? Seems like that isn't really doing anything different but then again I'm lost and clueless when it comes to programming so maybe you meant something else? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.