Seems the requirement not clear.What do you mean by hiding the icon and Why you want the icon to hide?
The icon in the app list I presume. If it's for a service or some other hidden process that never needs a GUI then no need for an icon. Then again, hopefully it's not for malicious purposes...
Posting questions without code is like going to the doctor and saying "it hurts, fix it."