ログインしているユーザー名を取得するサンプルです。
//---------------------------------------------------------------------------
void __fastcall TForm1::FormCreate(TObject *Sender)
{
//ユーザー名の取得
DWORD dwlen;
char cUsername[256];
dwlen = sizeof(cUsername);
GetUserName(cUsername,&dwlen);
Edit1->Text = cUsername;
}
//---------------------------------------------------------------------------
DownLoad bcbtips084.lzh 4KB(BCB5)