Mengetahui User Komputer

{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);
const
cnMaxUserNameLen = 254;
var
sUserName     : string;
dwUserNameLen : DWord;
begin
dwUserNameLen := cnMaxUserNameLen-1;
SetLength(sUserName, cnMaxUserNameLen);
GetUserName(PChar(sUserName), dwUserNameLen);
SetLength(sUserName, dwUserNameLen);
showmessage(‘Username saat ini adalah ‘ + trim(sUserName));
end;

end.

Berikan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

Ikuti

Kirimkan setiap pos baru ke Kotak Masuk Anda.

%d blogger menyukai ini: