cant find UserName or LoginName in dot net help?

in vb6 it's GetUserName(stBuff, lBuffLen)
where GetUserName() is in the win api
how to do in dotnet? (2008 express)
couldn't find in help - guess i don't know the right search term, user, 
username,login,loginname etc didn't turn up an answer that i could see.

thanks
mark


0
mp
6/26/2010 6:40:34 PM
dotnet.languages.vb 830 articles. 0 followers. Follow

2 Replies
1108 Views

Similar Articles

[PageSpeed] 57

Am 26.06.2010 20:40, schrieb mp:
> in vb6 it's GetUserName(stBuff, lBuffLen)
> where GetUserName() is in the win api
> how to do in dotnet? (2008 express)
> couldn't find in help - guess i don't know the right search term, user,
> username,login,loginname etc didn't turn up an answer that i could see.

Environment.UserName Property (System)
<URL:http://msdn.microsoft.com/en-us/library/system.environment.username.aspx>

-- 
  M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
  V B   <URL:http://dotnet.mvps.org/dotnet/faqs/>
0
Herfried
6/26/2010 7:21:31 PM
"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message 
news:i05jvi$grb$1@news.albasani.net...
> Am 26.06.2010 20:40, schrieb mp:
>> in vb6 it's GetUserName(stBuff, lBuffLen)
>> where GetUserName() is in the win api
>> how to do in dotnet? (2008 express)
>> couldn't find in help - guess i don't know the right search term, user,
>> username,login,loginname etc didn't turn up an answer that i could see.
>
> Environment.UserName Property (System)
> <URL:http://msdn.microsoft.com/en-us/library/system.environment.username.aspx>
>
> -- 
>  M S   Herfried K. Wagner
> M V P  <URL:http://dotnet.mvps.org/>
>  V B   <URL:http://dotnet.mvps.org/dotnet/faqs/>

Thanks Herfried,
i could swear that username didn't pull that up in my searches...but it sure 
does now!
Guess i was just temporarily blind!?! (or permanently stupid maybe :-) )
Thanks again,
Mark 


0
mp
6/27/2010 5:39:21 PM
Reply:

Similar Artilces:

Finding characters within a text
Hi How to check, using single formula, that a text within a certain cell contains one of certain characters? For instance, how to check if there is a 'R', 'L' or 'Ps' character within cell A1 that reads 'W-RII'. Thanks in advance Hmm..not very elegant, but maybe =NOT(AND(ISERROR(FIND("R",A1)),ISERROR(FIND("L",A1)),ISERROR(FIND("P",A1)))) Returns TRUE if the text in A1 contains 'R', 'L' or 'Ps' . FIND is case-sensitive, use SEARCH if you also want to find lower-case characters. Cheers, Joerg Mochiku...

Need Formula To Find Blank and NonBlank Cells
I have a worksheet with 6 columns (by Month) Sep Aug Jul Jun May Apr I have to review starting for example with May, I need to find any cell in May range that is null <> where Jun and Apr both are not null <> So if May is null and Jun and Apr are not null than I would count that as 1. If May is null and either Jun or Apr are null then I would not count them. =SUMPRODUCT(N(E2:E100=""),N(D2:D100<>""),N(F2:F100<>"")) "hilltop55" <hilltop55@discussions.microsoft.com> wrote in message news:08D989CB-D1B4-49F...

Outlook 2003 cant see email body
I upgraded a machine from outlook 2000 to outlook 2003. I cannot view the body of the emails. they are listed in the folders and the autopreview shows the fiorst three lines on most of them but the html body seems to have disappeared. This applies to newly received as well as old emails. ...

Sql to find record in a hierarchical chain
Hi, lets say I have a table with 2 fields: myTable Field 1 - ref Field 2 - parentRef Now in the structure there could be numerous chains until you get to the top of the hieratchy (where the ref field = parentRef field). ie ref parentRef 111 222 222 333 333 444 444 444 so in this 444 is top of the chain (there will be many other records as well that are nothing to with 444 and are part of their own hierarchy). So how do I easily relate 111 to 444. Ie how do i find the ultimate top parent for a given 'ref' field. Hope anyone can give me some pointers ...

Please Help!!
I am having problems restoring a backup money file from my cdrw disc. I recieve the error that it can't open possibly because it is a read only file or you do not have permission to change it or your disk drive is write protected. I have never had this problem before. I have restored files from my cd backup 3 times before without a problem. Please help!!!! Restore the file to writable media - your hard drive. If you still can't open it, right-click on the file in its new location, choose Properties from the context menu, and remove the check from the 'read-only' box. -...

Help! Setfocus problem
i ave a dropdown field on the first tab. I use setfocus so that it selects a different field to stop users scrolling down and changing the selection on the load event. Problem When a user changes tab and come back to the origional tab the setfocus doesnt run as the form is already loaded. How do you get around this? This is driving me and users mad at minute...please help before i open another bottle of dark rum! Hi Brian, Check out following URL; how to fire onclick event on tab click. It may help you. http://crmrocks.net/?p=16 -- PLEASE do click on Yes or No button if this post wa...

Finding all queries which use a table
Hi, Does anyone know of a tool that can scan all queries in a database and find if a certain table is used? I have a table called tblCustomerRollup which is old and outdated. I want to see which of the 500 queries in my database use this table without opeing every single one of them? Thanks, -- Chuck W Chuck Sounds like a variation on Search/Replace. Try searching online for "Database Documenter" as a starting point. A couple of the commercial tools I've used include FMS, Inc.'s Total Access Analyzer and Black Moshannon's Speed Ferret. There are a lot of fr...

Where do I find SSADM 4+ templates in Visio ?
Hi, I understand SSADM 4+ templates were available in Visio 2002. I have just moved from Smartdraw to Visio Professional 2003 and am having difficulty finding SSADM 4+ templates. Does anyone know where I can find these templates? Are they still available in the 2002 version? ...

Help with conditional formatting with 2000
Any help would be greatly appreciated. I am trying to group data together into increments of 10% of th numbers and then chart them based on these groups. For example, I hav 300 data points that vary from 20 to 500 in value. I want them t appear in a chart based on the number of values that fall in the lowes 10% of numbers (ie. 20-40) then the next 10% (ie. 40-60) etc. up to th top 10% of numbers, but I do not want to manually determine what thes ranges are. I want to see a distribution of how many numbers fal within each 10% of values. I am not sure if this makes sense, please let me know...

Internet connection problem
Hi. I hope someone is able to cast some light on a problem. We have a home network (all computers running XP) some wired and some wireless. For about a month now we have intermittent connection problems in that any one computer (randomly) will not connect to internet. I think all of the computers have suffered from the problem. Rebooting the affected computer makes no difference but rebooting the router can sort it until the next time. Even my mobile phone occasionally cannot connect. In Firefox the message is just "server not found". Pinging an IP address results in a time...

You wont believe this! SERVER DOWN
I was helping the operations/it director to get RPC over HTTP going on their exchange server for a company I use to be the sys admin for. The ops/it director was doing the add/remove programs portion to add rpc over http there, somehow in the process of doing this he managed to uninstall IIS -or- just NNTP and SMTP (I can't figure out which and he claims he did neither). Long story short, I've reinstalled NNTP and SMTP, reconfigured SMTP to the best recollection I have of the previous config and the server still refuses to send/receive email, even internally. All services are s...

XL 2007: How to find out what keyboard shortcuts I've assigned to macros?
Over the years, I've recorded and written a lot of macros. (Probably time to take a week or two and go over them and delete at least half!) I assigned a keyboard shortcut to a lot of them. I seem to remember that before XL 2007, there was a keyboard organizer that I could go through and review what shortcuts I had already assigned to my macros. I can't find that in 2007, though. Is there an easy way to generate a list of all my keyboard assignments and what macros they go to? Ed I don't recall ever seeing any such keyboard organizer in 2007. Canned from a prev...

I need help restoring Public Folders
Hi I've been having issues getting Public Folder replication going between 2 Exchange 2003 servers. Prior to doing any work I performed a Backup using Veritas Backup Exec and this completed and verified correctly. I screwed things up and managed to delete some of the public folders on my original server. I'm not 100% sure what I did but it is a mess and the only backup I have is the Exchange backup I created before doing any work. The public folders contain a number of Contact Lists and a very important Event Calendar. I have restored the public folders but when the restore c...

!!HELP!!! Cannot connect to Exchange Server from a RDP, ICA session or server local machine
Please excuse the posting as I wasn't sure which group to post this in. I'm having issues using Outlook from a server desktop, an RDP or ICA connection. I have remote users who connect using Citrix. They logon to the Citrix server desktop (Windows 2003 Server) and use Outlook from there. They can also use Outlook from within Citrix as it is a Published Application. I know some of you are going to suggest why don't they use OWA but let's not get into that. I can log onto any workstation here in the office and connect to the Exchange server and open their Outlook. What I and they...

Help with Synchronizing a user folder with a Public Folder
Hi: Hoping that someone can offer a suggestion on this one. I'd like to be able to synchronize an email folder in a particular users' Outlook account with a public folder. The idea is to have email conversation threads in a particular folder (just one folder) visible to others in the group via the public folders. Ideally, it would be great if changes to the public folder are instantly mirrored in the users folder - but that requirement is not critical, the core requirement is to have the public folder mirror the user's folder (in real time). I know that I could accomplis...

Need help on a formula 05-20-10
I need a formula to calculate the following information please: I will have someone enter a time (ex 6:31) in cell C3. If the time matches one of the times in cells B17-B22 I need it to display 4.6, if it matched one of the times in cells B23-28 I need it to display 4.7, if it matches one of the times in cells B29-34 I need it to display 4.8 and so on. Does anyone have a simple formula I can do for this please? =IF(COUNTIF(B17:B22,C3)>0,4.6,IF(COUNTIF(B23:B28,C3)>0,4.7,IF(COUNTIF(B29:B34,C3)>0,4.8,"no match"))) Can't do the "and so on" part, bu...

Terminal Servers in Cluster - Login/Profile Issues
Hello Gurus, Currently I am having an issue with logins and profiles as per details below. Server/Network Configuration Details: 1 X Windows Server 2008 Std FE 64bit (DC) 2 X Windows Server 2008 Ent 32bit Terminal Servers User Profiles are Roaming and exist in: \\SBSERVER\Profiles on the Domain Controller and C:\Users\ on the Terminal Servers. Approx 50 users. Problem Description Error messages when logging in the terminal servers: Your roaming profile is not synchronized correctly with the server. Windows will load your previously-saved local profile instead. See the pre...

INI files with VB 2003.NET
Which is the best VB newsgroup for VB.NET (.NET v1.1 in VS 2003.NET)? I'm looking for a way to do some simple serialisation of settings, possibly using a simple INI file in the application directory. Does .NET support this or should I use the registry? I like the idea of the INI file because its so simple. Can anyone point me at the class to use or perhaops an example on the web. I'm an experienced C++ and Delphi developer, but am fairly new to VB and also fairly new to .NET. Many thanks, Alain > Which is the best VB newsgroup for VB.NET (.NET v1.1 in VS...

Problem with charting Net income vs Year
Im having some problems with my Excel chart. It will not plot Net Income vs Year. It keeps trying to treat Year as a different data series. It will work if I use text i.e. a1990, a1991, etc. but it refuses to use 1990, 1991... Any Ideas??? Use an "XY (Scatter)" chart, instead of a "Line" chart. Jerry Hunter wrote: > Im having some problems with my Excel chart. It will not plot Net Income vs Year. It keeps trying to treat Year as a different data series. It will work if I use text i.e. a1990, a1991, etc. but it refuses to use 1990, 1991... Any Ideas??? Delete the co...

RMS 2.0 matrix dimensions are annoying, but help is available
For reasons I don't understand, MS saw fit in RMS 2.0 to use dimensions data for matrix components that is far less accessible to users than Sub Descriptions are. For instance, I can't edit assign a dimension value to an existing item I have added to a matrix. I can't see a reason for using Dimensions with limitations like this as using Sub Descs. to describe matrix "dimensions" worked fine previously. Does anyone know why MS did this? It's annoying! Digital Retail Solutions (DRS) has a product called Power Ops (Build 2.2.0003). It's help file mentions (se...

Find and replace with bold in cells
I have a VB6 program that is executing Excel 2007, opening a worksheet, and extracting some of the cells to write data to a text file. Some of the cells contain bold text on some (not necessarily all) of the text in the cell. I would like to do a find and replace on the bold tagging to replace it with something like "<b>" at the start of it and "</b>" at the end of it. How do I set this up in VB6? Thanks! The following function will return a string including <b> and </b> tags from the text of cell R. Function BoldMarkup(R As Range) As...

Formula to find last monday (tue, wedn, thu or friday) for a given month
Hi, I need a formula to calculate the date of the last monday, tuesday, wednesday, thursday or friday of a given month. Can't seem to find the answer anywhere. example: day: wednesday (or corresponding nr) month: 3 year: 2004 Result: 31/03/04 Who can help? Thank you for reading and eventually answering my question.Back Visit http://www.cpearson.com/excel/DateTimeWS.htm#DaysInMonth -- Kind Regards, Niek Otten Microsoft MVP - Excel "Michele" <mw001@pandora.be> wrote in message news:b30b6913.0402090708.556d0faa@posting.google.com... > Hi, > I need a...

Excel Formula Help
I am setting up a basic excel spreadsheet and really have got no experience with excel. I want to do something real basic like if A2=laptop display $10 or if A2=desktop display $20 how do I do this? I think that if the list of options is more than a just a few, a =vlookup() function would work nicely. It may seem a little complex to start, but once you use it, you'll find tons of more reasons to use it. Debra Dalgleish has some nice instructions at: http://contextures.com/xlFunctions02.html BadSector wrote: > > I am setting up a basic excel spreadsheet and really have got no...

Help-- Having trouble opening Word & Entourage
I have to keep restarting my computer to be able to open Word or Entourage. The icons just bounce a little but won't open. I was getting a request from Entourage to rebuild the database which I did about 6 or 7 times. I got another warning which I ignored. I am on a MacBook Pro (Intel based). I am using office 2004. My Entourage database is 3.2 gb. I ran Disk Utilities a couple of times. I also had a problem a couple of times with FileMaker Pro but not sure if related. Thanks Christina On 22/8/06 20:01, in article 1156273266.788654.318170@i42g2000cwa.googlegroups.com, "...

Displaying MS Excel Chart control in ASP.NET Application
Hi, We are working on an ASP.NET (VB.NET) application. In one of th screens of our application, we need to show a graph and for this we ar using MS Excel Graph control. We have the graph prepared in Excel. Th application would feed in certain values into certain cells of th excel file and the graph would be drawn by the graph control based o these cells. We need some help on how exactly to display the excel graph contro directly on the screen of ASP.NET application. Thanks for the help oursm -- oursmp ...