How to prevent the taskbar repaint.

I write a program and just need a tray icon. So I need to remove the icon from taskbar. I found if I set an invisible frame as my mainFrame's parent, the taskbar icon can be removed. But the program eat more memory, If I minimax the mainFrame, it will use little memory. But this will add an icon on taskbar firstly then remove it. Can I lock the taskbar repainting?
[371 byte] By [ioat] at [2007-11-18 19:11:48]