Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help !!! - Computer Name....

Status
Not open for further replies.

venado

Programmer
Nov 28, 2000
35
CA
Hi,

Can someone tell how to get the Computer and User name from within visual foxpro. I know in Visual Basic there is API call to GetComputerName but this doesn't work in Foxpro.

Any suggestion? or Example..

Thanks
 
sys(0) will return (in this Format)
Computername # Login

I usually assign this to a variable to be used later in the Main program something like this.

Clogin=upper(substr(sys(0),at('#',sys(0))+2,len(sys(0))))
Cworkstation= upper(left(sys(0),at('#',sys(0))-1))

HJ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top