Laser fence is a mechanism used to detect objects that passes vision line between the laser source and optical detector. While, Motion detection theory is the operation of detecting a variation in the location of a body relative to its environment or a variation in the circumference relative to a body. Therefore,this work provides an intelligent link between those two methods using optical communication, by using a new method for detecting moving objects from static background based on different window frames,which achieves the most efficient security system based on high assessment. This assessment was achieved by using visual basic language to evaluate the system. The system program is by using c# as program language to detect a penetration.