Another way to disable CTL-Z when a VI is running is to remove it from the menu. You can copy either the default or minimal menu, copy it to the custom, and then delete Undo from under Edit. Might as well delete Redo at the same time. With either the custom menu or trapping it with an event however, Undo will be active when the VI is stopped.