My.User
My.User
is a property that allows getting information on the user who logged in to the Windows operating system and that is running the application. Such a property is of type Microsoft.VisualBasic.ApplicationServices.User
and is a wrapper of this last mentioned one, meaning that you can invoke both and obtain the same results. Utilizing My.User
is straightforward because it offers just a few but easy-to-understand members, as summarized in Table 19.2.
Listing 19.1 shows how you can get information on the current user that runs the application. Notice how an invocation to InitializeWithWindowsUser
is required ...
Get Visual Basic 2015 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.