0
One way to do is create a class called "Users" and have two static variable on it "UserName" and "UserType". Now once you store the variable in this class static variable you can get the value of it from any form.
Let me know if this solve your problem.
0
Im new to programming so this might not be right.
but i believe you dont want to create a global variable.
you want to define a method in the same class as your original form that returns The username and one that returns the usertype.
implement them somewhere between the constructor and destructor. Then call it from the second form with a reference to the original class and method.
This is something i am going to try in the near future so im not sure on all of the specifics. like i said i am new to this, but good luck and let me know if it helps, as i will be trying to do the same thing soon.