Drop an Indy TCP client on to your form, or create one programatically,
label1.caption := tcp_conn.LocalName;
I called my TCP object tcp_conn and drop the name into label1's caption on the form.
There are 10 types of people in the world. Those that understand binary and those that don't.