Hey folks,
I looked around in the Online help in VFP (the version I am using to
develop this small Time Tracking utility is 7.0 - but, I could always
switch over to VFP if the option IS there!) - but, I found no way to
capture the Username (as in the Windows login). I suspect there may be
no
Try the GETENV() function. (I'm not sure if that's available in 7.)
rk
Original Message-
From: profoxtech-boun...@leafe.com [mailto:profoxtech-boun...@leafe.com] On
Behalf Of Kurt Wendt
Sent: Tuesday, June 22, 2010 12:12 PM
To: profoxt...@leafe.com
Subject: Capturing the Username in VFP
(lcUserName,CHR(0),'')))+space(10),10),space(10))
ENDFUNC
HTH,
Kent
-Original Message-
From: profox-boun...@leafe.com
[mailto:profox-boun...@leafe.com] On Behalf Of Kurt Wendt
Sent: Tuesday, June 22, 2010 12:12 PM
To: profox@leafe.com
Subject: Capturing the Username in VFP...
Hey
Here's one I've used for years.
local lcusername,lres,cUser
Declare integer GetUserName in advapi32 String@, Integer@
lcusername = replicate(chr(0),255)
lres = GetUserName(@lcusername,255)
If lres # 0
cUser=(upper(left(lcusername,at(chr(0),lcusername)-1)))
Else
cUser=UNKN
Endif
There is a sys() for it, 1 I think. Give computer name as well
Al
-Original Message-
From: profoxtech-boun...@leafe.com [mailto:profoxtech-boun...@leafe.com] On
Behalf Of msav...@golden.net
Sent: 22 June 2010 19:10
To: profoxt...@leafe.com
Subject: RE: Capturing the Username in VFP
Sys(0) returns the username # computername.
-Original Message-
From: profoxtech-boun...@leafe.com [mailto:profoxtech-boun...@leafe.com] On
Behalf Of Kurt Wendt
Sent: Tuesday, June 22, 2010 7:12 PM
To: profoxt...@leafe.com
Subject: Capturing the Username in VFP...
Hey folks,
I looked
I found no way to capture the Username (as in the Windows login). I
suspect there may be no native way in VFP to do it.
lcLogin = ALLTRIM(GETWORDNUM(SYS(0), 2, #))
Rick
White Light Computing, Inc.
www.whitelightcomputing.com
www.swfox.net
www.rickschummer.com
Thank you all VERY much for your Help on this!!!
Grigore - I actually did look in the Help under the SYS commands - and I
saw that Sys(0) was the Network ID. Guess I didn't know that the
Username would have been included within it!
And - thank you Rick for that command - which I am going to try
...@leafe.com
Subject: RE: Capturing the Username in VFP...
Thank you all VERY much for your Help on this!!!
Grigore - I actually did look in the Help under the SYS commands - and I
saw that Sys(0) was the Network ID. Guess I didn't know that the
Username would have been included within it!
And - thank you
Of Richard Kaye
Sent: Tuesday, June 22, 2010 3:42 PM
To: profoxt...@leafe.com
Subject: RE: Capturing the Username in VFP...
I checked the Foxwiki and GETENV() was added as of VFP6 -
GETENV(USERNAME). No parsing or DLLs required...
rk
-Original Message-
From: profoxtech-boun...@leafe.com
10 matches
Mail list logo