Click here to Skip to main content
Click here to Skip to main content
Technical Blog

Tagged as

MobileDevelopment: Using shFullScreen API to show hide Start icon

, 26 Mar 2014 CPOL
Rate this:
Please Sign up or sign in to vote.
Uuups, sometimes we are looking for a way to do simple things and do not remeber how easy it was. Question: How can one hide/show the start icon in taskbar of Windows Mobile 6.1 (and before)? Answer: Use the API provided by Microsoft for this: SHFullScreen! No need to use FindWindow and subclass, ve

Uuups, sometimes we are looking for a way to do simple things and do not remeber how easy it was.

Question: How can one hide/show the start icon in taskbar of Windows Mobile 6.1 (and before)?

Answer: Use the API provided by Microsoft for this: SHFullScreen! No need to use FindWindow and subclass, very simple use.

Ah, remeber that this will NOT work on Windows Enbedded Handheld 6.5.3 or Windows Mobile 6.5.3 or whatever you call it. The API will simply not do it’s work.

Here is a C# example for SHFullScreen usage.

create a class file (ie SHFullScreen.cs) and insert the following:

using System;
using System.Drawing;
using System.Collections;
using System.Windows.Forms;
using System.Data;
using System.Runtime.InteropServices;

namespace KioskTest
{
    public class SHAPI
    {
        public const int SHFS_SHOWTASKBAR = 1;
        public const int SHFS_HIDETASKBAR = 2;
        public const int SHFS_SHOWSIPBUTTON = 4;
        public const int SHFS_HIDESIPBUTTON = 8;
        public const int SHFS_SHOWSTARTICON = 16;
        public const int SHFS_HIDESTARTICON = 32;

        [DllImport("aygshell.dll")]
        private extern static bool SHFullScreen(IntPtr hWnd, int dwState);

        public static bool showStart(IntPtr wHandle, bool bShowHide)
        {
            bool bRet = false;
            IntPtr hwnd = wHandle;
            if (!bShowHide)
                bRet = SHFullScreen(hwnd, SHFS_HIDESTARTICON);
            else
                bRet = SHFullScreen(hwnd, SHFS_SHOWSTARTICON);
            return bRet;
        }

        public static bool FullScreen(IntPtr hWnd)
        {
            return SHFullScreen(hWnd, SHFS_HIDESTARTICON | SHFS_HIDETASKBAR);
        }
    }
}

Now in your form code just use the following call to hide the Start Icon:

    KioskTest.SHAPI.showStart(this.Handle, false);

That is all, see here:

with_starticon   without_starticon

No full project source code for this easy one.

Have fun!

<!-- Social Bookmarks BEGIN --> <!-- Social Bookmarks END -->

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

hjgode

Germany Germany
No Biography provided

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.141216.1 | Last Updated 27 Mar 2014
Article Copyright 2014 by hjgode
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid