Well i know how to do it via winsock

text1.text = winsock1.localip

have fun