Determining if a .NET CF ComboBox is dropped down

The following snippet of code can be used to determine whether a Windows Mobile ComboBox (in .NET Compact Framework) is currently dropped down or not:

 

 

How to unprotect a password protected .XLSX file

I found a pretty easy way of disabling the password protection in the new Excel Worksheet files (XLSX) used by Excel 2007 and 2010.  Just follow these simple steps:

  • Change the file extension from .XLSX to .ZIP
  • Extract the file to a folder with your favorite unzipper (7-Zip is what I used)
  • Go to the xlworksheet sub-folder that you just extracted
  • There should be one or more files named like: sheet1.xml (sheet2.xml, etc). Inside of one of those files is an XML tag: <sheetProtection password=… />. Delete that entire XML tag.
  • Re-zip the files back up
  • Rename from .ZIP to .XLSX

Done!

UPDATE: This method only applies to password protected workbooks.  If the file is secured with the “Encrypt with Password” feature, it will not work.

UPDATE 2: It is important that you don’t have Windows configured to hide file extensions (which unfortunately is the default behavior). To enable displaying file name extensions, follow this Microsoft support article.

Get a list of active local users with .NET

The code below will return all users on the machine that are not marked as disabled. Be sure to add a reference to System.DirectoryServices.

 

 

New blog

Hello World.

I’ve created a new WordPress blog, as it seems I lost the domain I’ve had for the last 11+ years (digitalpropulsion.org).  I’m not too worried about it, but I figured it was time to start up a new one.  You can find more of my social links at about.me/aplocher.

This WordPress blog will be used primarily for programming and misc technology posts.  I’ll continue using my Tumblr account for videos, ridiculous pics, and links to other articles.

Over the next few days I’ll be reposting some of my older programming posts.