Please insert SysRefresh() before the first DrawLine() statement. If it works let it work till Mr Antonio provides us with the correct solution.I will test insert SysRefresh in that method and try. Any news I post here!
Meanwhile, can you please let us know under what circumsances are you getting this problem? I would like to recreate under what all circumstances this problem happens. That might help us to localize the problem.