'how' do i /what do i use , to detect that the program to connect to the internet(dialer) has been executed ?so that after that i jus have to read the ip using winsock

OR, is there any other way ...

can i detect the ip through an app that opens at start up but gets the ip only when i go online ? [blink]
_________________________
"it is the question ...that drives the answer..."
Keep Clicking,
Bosky