In my project I need to hide the icon of an external application from taskbar. I am able to fetch appropriate window handle using FindWindow method in user32.dll
Is there any function to hide taskbar icon, something like:
HideTaskbarIcon (hwnd as IntPtr)
I have found the following code on google but can't understand the operators, can someone elaborate the operators used and their equivalent in visual basic:
long style= GetWindowLong(hWnd, GWL_STYLE);
style &= ~(WS_VISIBLE); // this works - window become invisible
style |= WS_EX_TOOLWINDOW; // flags don't work - windows remains in taskbar
style &= ~(WS_EX_APPWINDOW);
ShowWindow(hWnd, SW_HIDE); // hide the window
SetWindowLong(hWnd, GWL_STYLE, style); // set the style
ShowWindow(hWnd, SW_SHOW); // show the window for the new style to come into effect
ShowWindow(hWnd, SW_HIDE); // hide the window so we can't see it