Added some visualization customizations and the ComThread will be closed when terminating the form window.