[DllImport("coredll.dll", EntryPoint="FindWindowW", SetLastError=true)]
private static extern IntPtr FindWindowCE(string lpClassName, string lpWindowName);
Declare Function FindWindowW Lib "coredll.dll" (TODO) As TODO
None.
Do you know one? Please contribute it!
Taken from openNetCF in OpenNETCF.Win32.Core
Can be used to hide the start bar and start menu.
public void HideStartBar()
{
IntPtr handle;
try
{
// Find the handle to the Start Bar
handle = FindWindowCE("HHTaskBar", null);
// If the handle is found then hide the start bar
if (handle != IntPtr.Zero)
{
// Hide the start bar
SetWindowPos(handle, 0, 0, 0, 0, 0, SWP_HIDEWINDOW);
}
}
catch
{
MessageBox.Show("Could not hide Start Bar.");
}
}
public void ShowStartBar()
{
IntPtr handle;
try
{
// Find the handle to the Start Bar
handle = FindWindowCE("HHTaskBar", null);
// If the handle is found then show the start bar
if (handle != IntPtr.Zero)
{
// Show the start bar
SetWindowPos(handle, 0, 0, 0, 240, 26, SWP_SHOWWINDOW);
}
}
catch
{
MessageBox.Show("Could not show Start Bar.");
}
}