You can do it by creating a static class suppose it is Global.cs
now define few variables in it i.e
public static string user="";
now if your application have a login form then on btnclick event pass the userid to this Global variable i.e
Global.user=txtuser.text;
then use this Global variable in your application as globally.
hope u got it or i am correct