Get user profile information
Visual Basic tutorials for UWP apps.
3 posts
Page 1 of 1
The following will allow you to get and use the logged in users profile information for use in a metro app.
Get the users display name:
Get the users display name:
Code: Select all
Get the users first name:Windows.System.UserProfile.UserInformation.DisplayName
Code: Select all
Get the users last name:Windows.System.UserProfile.UserInformation.FirstName
Code: Select all
Get the users profile picture:Windows.System.UserProfile.UserInformation.LastName
Code: Select all
Change "ImageControl" to the name of the control you wish to display the image inside. You can also change ".SmallImage" to ".LargeImage" to get a larger version of the profile picture.Dim ProfilePicture As StorageFile = Windows.System.UserProfile.UserInformation.GetAccountPicture(Windows.System.UserProfile.AccountPictureKind.SmallImage)
Dim PictureStream As IRandomAccessStream = Await ProfilePicture.OpenReadAsync()
Dim BitmapImage As BitmapImage = New BitmapImage()
BitmapImage.SetSource(PictureStream)
ImageControl.Source = BitmapImage
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
Can you tell us where you got all this info? I'm excited about it.
:lol: nice
to bad i haven't win8
but i known you can do the same thingy in other windows.
okay maybe not the same 100% code but just enough
to get that part
to bad i haven't win8
but i known you can do the same thingy in other windows.
okay maybe not the same 100% code but just enough
to get that part

visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
3 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023