Using the Code

Important Code

This is where most of the work is done. Next, we have a timer. As the timer ticks, we are going to try to connect to the port using a Try/Catch statement. If it connects, the port number is added to the second listbox. If it does not connect, listbox1 adds an item with the port number saying it is not open.

Comments and Discussions

I am trying to develop an application which could check if a port is blocked in a system (local and remote both).
This application only tells if the port is in use. It says open if you are using an application on the port and closed if I am not using any service over that port. I that case, if a port is close, Doenst mean that its blocked, because you can still host an application on the same port and on doing so it then would detect an open port(Which is actually a port in use status)

Where is multithreading in your example, it's slowest port scan that I seen using bad thing timers, and why only VB.NET version evalable if we want to scan in Unix or other OS using MONO and why not show detail information about every port like most port scanners doing that.