Hi, I looked at r11564. procedure DestroyGlobalCaret can be much simpler: FreeAndNil(GlobalCaret); I don't know if DestroyGlobalCaret is called from more than one place, but if it is used in only one place, I would remove the complete procedure. Vincnet