Main goal of my Bachelor’s thesis is to realize the program for the automatic measurement of optical networks. First part of this project describes the optical fiber, dispersion and types of measurement. There are described chromatic (CD) and polarization mode (PMD) of dispersion. There is described the programming for Windows by using Windows 32 API. Main part are description of creating window of application, work of keyboard and mouse in Windows, sending messages to window procedure and controlling parts in Windows. There is a description of the program and more detailed description of the most important functions in the last part. We can also find here the graphs CD and PMD from the testing automatic measurements