Long time I used .net Forms, but as I remember there was an built in option to show/hide windown in taskbar somethink like:
this.ShowInTaskbar = false;
As you already got into WinAPI for doing that. I strongly suggest to double think and research if it's needed. If you still think winapi is the best approach, read this:
https://msdn.microsoft.com/en-us/library/windows/desktop/ff700543(v=vs.85).aspx[
^] you somethink like this should do the trick:
SetWindowLong(handle, GWL_EXSTYLE, GetWindowLong(handle, GWL_EXSTYLE) | WS_EX_APPWINDOW);
SetWindowLong(handle, GWL_EXSTYLE, GetWindowLong(handle, GWL_EXSTYLE) & ~WS_EX_APPWINDOW);
The idea is to get the current window style and add or remove flags you want (also read about bitwise operations and how adding/removing flags works).