Be sure in Project -> Properties, Target tab, the Type is "GUI application" and no "Console application".
Now all you need is your application is re-linked (rebuild should do, or just add a new line at the end of any file).
If that doesn't work (it should), add -mwindows to the linker options (for MinGW).