Technology Questions

Go Back   Technology Questions > Hardware Questions > Mobile Computers > Tablet PC > Tablet PC Software > Tablet PC Developers

Tablet PC Developers Show off your work while discussing with others how to create ink enabled applications.

Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old 05-06-2007, 07:30 AM
Ricardo Martinez
Newsgroup Contributor
 
Posts: n/a
Obtain Username from Network .NET Framework

I would like to know how can I get the user name logged in and save in a
string variable
My application runs over a Smart Application Device


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

 
Old 05-06-2007, 07:30 AM
  #2 (permalink)  
Old 05-06-2007, 07:30 AM
Shaun C McDonnell
Newsgroup Contributor
 
Posts: n/a
Re: Obtain Username from Network .NET Framework

Ricardo,

Try 'Environment.Username'

Shaun McDonnell

"Ricardo Martinez" <rmartincas********.com> wrote in message
news:e3IGPtHUHHA.5016@TK2MSFTNGP05.phx.gbl...
>I would like to know how can I get the user name logged in and save in a
>string variable
> My application runs over a Smart Application Device
>
>

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #3 (permalink)  
Old 05-06-2007, 07:30 AM
Ricardo Martinez
Newsgroup Contributor
 
Posts: n/a
Re: Obtain Username from Network .NET Framework

I tried it but I just have 3 option under Environment OSVersion,
TickCount , Version
I add the line Imports System.Environment into the program

Any idea?
Thanks
Ricardo

"Shaun C McDonnell" <sm-nospammmmmers@eisoft.com> wrote in message
news:22903810-642E-415C-9774-7E30B5BD5EF2@microsoft.com...
> Ricardo,
>
> Try 'Environment.Username'
>
> Shaun McDonnell
>
> "Ricardo Martinez" <rmartincas********.com> wrote in message
> news:e3IGPtHUHHA.5016@TK2MSFTNGP05.phx.gbl...
>>I would like to know how can I get the user name logged in and save in a
>>string variable
>> My application runs over a Smart Application Device
>>
>>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #4 (permalink)  
Old 05-06-2007, 07:30 AM
Patrick Steele
Newsgroup Contributor
 
Posts: n/a
Re: Obtain Username from Network .NET Framework

In article <eDrvQSSUHHA.192@TK2MSFTNGP04.phx.gbl>,
rmartincas********.com says...
>
> I tried it but I just have 3 option under Environment OSVersion,
> TickCount , Version


Sounds like you're running on the Compact Framework. I didn't think the
Windows Mobile/PocketPC/CE-based devices had the concept of a logged-in
user.

--
Patrick Steele
http://weblogs.asp.net/psteele
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #5 (permalink)  
Old 05-06-2007, 07:30 AM
Shaun C McDonnell
Newsgroup Contributor
 
Posts: n/a
Re: Obtain Username from Network .NET Framework

Ricardo,

Ah, ok, I understand what you're getting at. You are going to have to
retrieve the username from the registry of the device.

They key you want to retrieve is [HKEY_LOCAL_MACHINE/Ident/Username]

Here is an example:

const string regPath = "Ident";
string username = Registry.GetString(Registry.RootKey.LocalMachine, regPath,
"Username");

In order to access the registry you are going to need some code that does
the task for you. Here is a link to download:

http://eisoft.com/files/6/smart_device/entry785.aspx

Shaun McDonnell

"Ricardo Martinez" <rmartincas********.com> wrote in message
news:eDrvQSSUHHA.192@TK2MSFTNGP04.phx.gbl...
>I tried it but I just have 3 option under Environment OSVersion,
>TickCount , Version
> I add the line Imports System.Environment into the program
>
> Any idea?
> Thanks
> Ricardo
>
> "Shaun C McDonnell" <sm-nospammmmmers@eisoft.com> wrote in message
> news:22903810-642E-415C-9774-7E30B5BD5EF2@microsoft.com...
>> Ricardo,
>>
>> Try 'Environment.Username'
>>
>> Shaun McDonnell
>>
>> "Ricardo Martinez" <rmartincas********.com> wrote in message
>> news:e3IGPtHUHHA.5016@TK2MSFTNGP05.phx.gbl...
>>>I would like to know how can I get the user name logged in and save in a
>>>string variable
>>> My application runs over a Smart Application Device
>>>
>>>

>
>

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Username/password on network share stevemon@ntlworld.com Windows XP 2 07-04-2008 07:41 AM
backup to a network drive is asking for username and password...whatusername and password? Lisa Hetherington Windows Vista 7 02-04-2008 07:40 AM
Network connection problem with Compact Framework 2.0 Echevil Pocket PC General 0 04-10-2007 09:45 AM
Can't obtain IP Red Deer Techy Windows Vista 0 02-05-2007 09:15 PM
Unable to obtain a server- assigned IP address Try again later or enter an IP address in Network Setting arena Pocket PC General 0 01-15-2007 11:06 AM


New To Technology Questions? Do You Need Help with Your Computer or Device? Do You Need Help with this site?

All times are GMT -8. The time now is 08:01 PM.


2003 - 2009 All Rights Reserved. Technology Questions

Search Engine Friendly URLs by vBSEO 3.3.0