Write an API function to retrieve the value from the key -
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
You can use GetUserName Lib "advapi32.dll" Alias "GetUserNameA" to get the logon username.
Lookout on calling APIs in
VB.NET. Hope this helps.