Hi Wayne,
Based on my understanding, you'd like to hide a form from the taskbar
through Windows API functions. If I'm off base, please feel free to let me
know.
To get what you want, the first step is to remove the WS_EX_APPWINDOW flag
from the extended window style of the form firstly. We can do this by
calling the Win32 function SetWindowLong. The second step is to set the
owner of this form to an invisible form.
The following is a sample in C#:
using System.Runtime.InteropServices;
public partial class Form1 : Form
{
public Form1()
{
int style = GetWindowLong(this.Handle, GWL_EXSTYLE);
style &= ~WS_EX_APPWINDOW;
SetWindowLong(this.Handle, GWL_EXSTYLE, style);
this.Owner = new Form();
}
public static int WS_EX_APPWINDOW = 0x40000;
public static int GWL_EXSTYLE = -20;
DllImport("user32.dll")]
public static extern int SetWindowLong(IntPtr hWnd, int nIndex, int
dwNewLong);
[DllImport("user32.dll")]
public static extern int GetWindowLong(IntPtr hWnd, int nIndex);
}
The following is sample in C++:
'How to dynamically show/hide the Taskbar application button'
http://www.codeguru.com/cpp/frameworks/advancedui/article.php/c3227/
Hope this helps.
If you have any question, please feel free to let me know.
Sincerely,
Linda Liu
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.