This is a problem you often run into using visual basic, at least while first getting started. The problem is, your window isn't getting completely redrawn. I don't quite remember the command to force a redraw, but you might find it if you contacted the Win32-GUI mailing list. http://sourceforge.net/projects/perl-win32-gui/
My code doesn't have bugs, it just develops random features.