Attached is a simple implementation of a port scanner.
It uses the Winsock control, and gives the option of how many threads to use for scanning at any one time.

Simple Port Scanner.zip