How do you tell CE .Net Compact Framework dialogs to not ShowInTaskbar?

Posted on 2006-04-19
Last Modified: 2010-05-18
I have a .NET C# Compact Framework application for Windows CE.  My app has several dialogs that get displayed, and they show in the taskbar when they get displayed.  How do I tell them not to show in the taskbar, (ie. like using the ShowInTaskbar property on the regular Forms class).  This isn't a property on a Form in the CF, so how is this done?  Thanks.
Question by:mromeo
    LVL 12

    Expert Comment

    When you say don't show the applications on the taskbar, what do you mean?  CE doesn't, as far as I'm aware, have a task bar.


    Form and controls
    As a rough guide, the .NET Compact Framework version of the Form supports more than three quarters of the events and methods and about half of the properties of the Form in the full version. You can set the colors, certain style properties, and include a menu. What you can't do is create an MDI application, SHOW THE FORM IN THE TASKBAR, implement drag and drop, and respond to certain keyboard events (like the Cancel button) that are not appropriate for small devices.


    Author Comment

    Well, I'm running it in the CE Emulator right now. Maybe it won't happen when I move it to the actual device.  I'll try that today.
    LVL 12

    Accepted Solution

    Your question got me thinking and when I looked at a PocketPC device last night, I noticed that there IS a window/program title that appears next to the start button.

    As frequently happens, I was wrong.  I was thinking POCKETPC not CE.

    This code snippet will do it ( from )

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

    namespace SmartDeviceApplication1
          public class Form1 : System.Windows.Forms.Form
                const int EXSTYLE = -20;
                const int WS_EX_NOANIMATION = 0x04000000;

                [DllImport("coredll.dll", SetLastError=true)]
                public static extern void SetWindowLong(IntPtr hWnd, int GetWindowLongParam, uint nValue);

                [DllImport("coredll.dll", SetLastError=true)]
                public static extern uint GetWindowLong(IntPtr hWnd, int nItem);

                private static extern IntPtr GetCapture();

                public Form1()

                      Capture = true;
                      IntPtr hwnd = GetCapture();
                      Capture = false;

                      uint style = GetWindowLong(hwnd, EXSTYLE);
                      style |= WS_EX_NOANIMATION;
                      SetWindowLong(hwnd, EXSTYLE, style);

    Author Comment

    LVL 12

    Expert Comment

    You're welcome, helped me learn something too!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    In one of my recent projects, I was working with IP cameras, I need to take some pictures from the camera and do some processing on it. The first step, was to retrieve the image from camera into Image object. So that it can be displayed or …
    Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now