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

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.
Who is Participating?
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);
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.

mromeoAuthor Commented:
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.
mromeoAuthor Commented:
You're welcome, helped me learn something too!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.