OK it compiles correctly and the icon works however when I close the application it gives me the "This application has encountered a problem and needs to close..." - which never occured before I got the icon working. Here is a snippet of my code from the GUI_APP_MAIN line down: