# VBForums CodeBank > CodeBank - Other >  [DELPHI] - Get Username

## Madboy

```
procedure TForm1.FormCreate(Sender: TObject); 
var 
NameBuf: array[0..80] of Char; 
SizeBuf: LongWord; 
begin 
SizeBuf := Sizeof(NameBuf); 
GetUserName(NameBuf, SizeBuf); 
Showmessage(NameBuf); 
end;
```

----------

