Home All Groups Group Topic Archive Search About

Cannot fully access My namespace facility in VS 2005

Author
18 May 2006 10:02 AM
KM
I am having difficulty accessing the logged in user name through the
My.User.Name in the My namespace in VB 2005 - the value is empty.

I suspect it may have something to do with the fact that this project
was upgraded from VS 2003, as I have no problems retrieving the user
name in a project created solely in VS 2005.

Many thanks for your suggestions.

Author
4 Jul 2006 11:43 AM
VictorH
In VS2005 only real Windows Applications do initialise then My.User object.
Call        
My.User.InitializeWithWindowsUser() to get this done in other apps (e.g.
class libraries or shared addins)

--
--
Victor Heijke
Microsoft Certified Professional
Software architect at Flores Automatisering
Amsterdam, the Netherlands
http://www.flores.nl


Show quoteHide quote
"KM" wrote:

> I am having difficulty accessing the logged in user name through the
> My.User.Name in the My namespace in VB 2005 - the value is empty.
>
> I suspect it may have something to do with the fact that this project
> was upgraded from VS 2003, as I have no problems retrieving the user
> name in a project created solely in VS 2005.
>
> Many thanks for your suggestions.
>
>