# Thursday, August 04, 2005

Someone asked me today “How do I get my CF window to not show up in the taskbar?”  Since Form.ShowInTaskbar isn't supported in the CF, I decided to play around and see how it's done.

It led me to play around with the SDF's Win32Window and EnumEx classes.  Basically, populate a couple ListViews with all the available style and extended style bits, then let the user check whatever s/he wants and reapply them.

187 lines of code later and I've got a very busy window (check out the caption bar) but it's still in the Taskbar.  Turns out to be not-so-easy after all - so I'll keep trying, but here's a quick sample on using the Win32Window.

Here's the meat of it:

private void ParentWindow_Load(object sender, System.EventArgs e)

{

      m_child.Show();              

      m_childWindow = Win32Window.FindWindow(null, "ChildWindow");

     

      WS childStyle = m_childWindow.Style;

 

      foreach(WS style in EnumEx.GetValues(typeof(WS)))

      {

            ListViewItem lvi = new ListViewItem(style.ToString());

            lvi.Checked = ((childStyle & style) != 0);

           

            lvwWS.Items.Add(lvi);

           

      }

 

      WS_EX childExStyle = m_childWindow.ExtendedStyle;

 

      foreach(WS_EX exstyle in EnumEx.GetValues(typeof(WS_EX)))

      {

            ListViewItem lvi = new ListViewItem(exstyle.ToString());

            lvi.Checked = ((childExStyle & exstyle) != 0);

           

            lvwWSEX.Items.Add(lvi);

      }

 

}

 

private void btnSetStyle_Click(object sender, System.EventArgs e)

{

      WS style = 0;

      foreach(ListViewItem lvi in lvwWS.Items)

      {

            if(lvi.Checked)

                  style |= (WS)EnumEx.Parse(typeof(WS), lvi.Text);

      }

      m_childWindow.Style = style;

 

      WS_EX exstyle = 0;

      foreach(ListViewItem lvi in lvwWSEX.Items)

      {

            if(lvi.Checked)

                  exstyle |= (WS_EX)EnumEx.Parse(typeof(WS_EX), lvi.Text);

      }

      m_childWindow.ExtendedStyle = exstyle;

      m_child.Refresh();

}

PostScript:

It turns out this is right.  If you modify the style of the Form during it's contructor, then it will not show up in the Taskbar (thanks Sergey).

public ChildWindow()

{

      InitializeComponent();

 

      Capture = true;

      Win32Window hwnd = Win32Window.GetCapture();

      Capture = false;

 

      hwnd.ExtendedStyle |= WS_EX.NOANIMATION;

}

 

PostPostScript:

This uses SDF 1.4, so if you're trying it, make sure you get the latest code (or wait a day until 1.4 is released)

 

Thursday, August 04, 2005 3:27:09 PM (Central Daylight Time, UTC-05:00)  #     | 
# Wednesday, June 01, 2005

So I was going through my office the other day and accumulated a small pile of stuff, which included a full copy of Studio 2003 Pro still in the box.  Of course I could eBay it all, but what fun is that?  I'm thinking I need to have some sort of competition or giveaway or something.  I don't want to go through the hurdles of our last competition, so I'm up for ideas.  What should I do with it all?

Wednesday, June 01, 2005 1:37:03 PM (Central Daylight Time, UTC-05:00)  #     | 
# Sunday, May 29, 2005

At MEDC I had a conversation with Seth Demsey about making a guitar tuner with a Pocket PC.  The challenge is getting analog data into the device and I proposed using an external ADC with an I2C interface using the serial port control lines for the I2C bus.  I'd spent a considerable amount of time over the last couple months working with the SPOT processor  and writing synchronous serial code and our conversation got me to thinking that the work was actually salvageable. 

I refactored a lot of the code so that now it can be used for the Compact Framework or even the Full Framework.  Couple this with the SDF's serial port classes and you could have an I2C bus running in under 5 minutes on a device or the desktop.  What fun!

Before you say “well the docs are nice, but where do I get the binaries?” let me preemptively answer.  I'll post binary downloads in the near future as soon as we get the licensing model ironed out.  These classes are not going to use the OpenNETCF Shared Source License.  Instead they will be commercial, for pay items.

Because I still think community access and learning is important for the community, I can tell you that the current plan is to offer the binaries as free for personal, non-commercial use.  Sorry, but only paying customers will get the source.

Sunday, May 29, 2005 9:35:34 PM (Central Daylight Time, UTC-05:00)  #     | 

Well I just read a simple question in the newsgroups that had to do with an InitializeComponents method exceeding the 64k JITted code maximum so I figured I'd post a link to the FAQ on the OpenNETCF Wiki.  I went to get the link and lo and behold once again the wiki was just full of spam.  Rather than go through it page by page an find the changes I pulled down the DB locally and eradicated the spam.  So there's 45 minutes that I intended to spend working on a white paper that instead went down the toilet. 

I'm at the point that I've got no idea how to prevent the spam, and I just don't have the time to routinely go in and clean the damned thing.  Don't be surprised if in the near future the Wiki becomes unwikified and we just disable all posting or redirect it back to the forums. It seems that what had the potential for being a useful tool for agregating and disseminating information has been ruined by a few complete jackass spammers.

Sunday, May 29, 2005 9:17:16 PM (Central Daylight Time, UTC-05:00)  #     | 
# Friday, May 27, 2005

I was just saying that the SPOT stamp price would have to come down to be competitive.  As if to underscore that idea, look at what you can get for $100.  And that's a PXA255 with flash!  Heck for $120 you get bluetooth.  WEDIG is starting a project called GumSTIX to run CE on it.  This is way cool.

Friday, May 27, 2005 5:29:14 PM (Central Daylight Time, UTC-05:00)  #     | 
# Thursday, May 26, 2005

I wrote this a couple months ago, but never got around to publishing.  Here it is though:

Profiling the National 2F43ES (SPOT) Microprocessor

 

Thursday, May 26, 2005 3:15:21 PM (Central Daylight Time, UTC-05:00)  #     |