Monday, August 15, 2005

Here's another article I'm working on for MSDN.  Again, comments are welcome.  A printer friendly version is here.  The source is available here.

8/15/2005 9:25:29 PM (Eastern Daylight Time, UTC-04:00)  #    Comments [3]  | 
 Sunday, August 14, 2005

Here's a draft of an article I'm putting together for MSDN.  Comments are welcome.  A printer friendly version is here.

8/14/2005 12:20:26 PM (Eastern Daylight Time, UTC-04:00)  #    Comments [1]  | 
 Wednesday, August 10, 2005

I just bought a new tool for tracking web stats (Web Log Explorer) and am a bit surprised at some of what I see.  For example, where are visitors coming from, geographically speaking?  Well, here it is:

Unfortunately I can report that the visitors from Aruba were not me (they're in the “other” chunk, with at probably a hundred other countries).

8/10/2005 2:29:24 PM (Eastern Daylight Time, UTC-04:00)  #    Comments [1]  | 
 Friday, August 05, 2005

Finally!  We've released SDF 1.4.  What's new you ask?  Well here's a quick list (which I extracted from check-in comments from the source Vault - you can do the same to see exactly what the changes are):

  • Bluetooth support added
  • Serial.GPS mods to standardize naming
  • Diagnostics.DebugMessage and RetailMessage
  • Bug fixes in TimeZoneCollection and DateTimeEx
  • Bug Fix in XmlSerializer for GUIDs
  • EventWaitHandle.WaitOne bug fix
  • Additions and fixes for AccessPoint and Adapter classes
  • Bug fix in StreamInterfaceDriver.DeviceIoControl
  • ThreadEx.RealTimePrioority added
  • Updated BatteryLife designer
  • Updated DateTimePicker Designer
  • Fixes and Updates to Win32Window
  • ApplicationEx fix for modal Forms and thread safety added
  • FTP bug fixes
  • ControlEx added support for WM_COMMAND
  • DeviceMonitor adds RequestDeviceNotifications
  • SelectedIndexChanged fix in ComboBoxEx
  • WS and WS_EX updated to remove unsupported styles
8/5/2005 10:57:21 AM (Eastern Daylight Time, UTC-04:00)  #    Comments [0]  | 

I often start on a project with the best of intentions to finish, but then something else comes up and I get side tracked.  I was going through code this morning and came across one such example from when I was doing the Travelling Salesman Problem on a device.  Someone on a newsgroup said a device wasn't powerful enough to do it - I thought that was BS, so I sat down and started coding.  Of course then other things came up and this ended up unfinished (though it's probably only a day of work away).  I did get far enough to do Help documentation for it.

Knowing myself and the list of things I need to do, I'm probably not going to get back to it any time soon, so if someone else wants the mental exercise, feel free to finish what I've done.

8/5/2005 10:39:44 AM (Eastern Daylight Time, UTC-04:00)  #    Comments [1]  | 

When the Smart Device Extensions (SDE) preview was released for Visual Studio 2002, several members of the mobile development community jumped in and started doing work with it. We individually set out to learn about the new framework and
how we could leverage it for what we were already working on.  During the process we collectively "hung out" in the Microsoft public newsgroups answering questions and providing feedback.

By the time Studio 2003 and CF 1.0 was released we had a pretty good understanding of how things worked.  We also had a good collection of code snippets and quick samples for the common questions it seemed everyone had.  The problem was that we were spending a lot of time cutting and pasting the same answers over and over.

I already had a web site running at InnovativeDSS.com (no longer in existence) with some community forums for another business, so I created some forums specifically for CF development and we started doing brain dumps into it.  Now we didn't have to paste in the whole answer to a question, but just a link, and it was a rudimentary searchable knowledge base.

It only took a couple months for things to get busy.  The snippets and samples were growing into more and more robust classes.  Neil and I got together and pitched the idea to the rest of the group that maybe we should put it all together in a single framework under a single project name.

We registered a domain name, got Neil's brother to make us a logo and launched the site.  It started as just a place to download the classes and to hold CF specific forums, but quickly we built and released SDF 1.0 and so we began.

8/5/2005 10:08:40 AM (Eastern Daylight Time, UTC-04:00)  #    Comments [0]  | 
 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)

 

8/4/2005 4:27:09 PM (Eastern Daylight Time, UTC-04:00)  #    Comments [0]  |