I have a proof of concept project and as part of it I need to identify the best way to display the User Name(the person logged on the PC) on the ToolWindow. The idea is to get this from the client and not the server or service. The package is to be VS 2008 first, then I need to do it in VS 2010 next. I am using WPF as the preferred UI. I am about a week into learning the ins and outs of VSX and appreciate all开发者_开发百科 guidance. Thanks, Danny
Ok, I got the answer. Very simple,
System.Security.Principal.WindowsIdentity currentUser = System.Security.Principal.WindowsIdentity.GetCurrent();
string loginName = currentUser.Name; tb1.Text = loginName;
精彩评论