Archive for the ‘Programming’ Category

Happy Fourth of July!

Friday, July 4th, 2008

Woke up early so I’ve been working on fixing the problem in IE Script Debugging Toggler where it doesn’t always change the script debugging state in open Internet Explorer Windows. Have been trying to use InternetSetOption() from WinInet.dll to force open windows to update their settings. I’m using the following code:

public static class WinInet
{
 
#region Public Constants
 
public const int INTERNET_OPTION_REFRESH = 37;
 
public const int INTERNET_OPTION_SETTINGS_CHANGED = 39;
 
#endregion

  [DllImport("wininet.dll", SetLastError = true, CharSet = CharSet.Auto)]
 
public static extern bool InternetSetOption(IntPtr hInternet, int dwOption, IntPtr lpBuffer, int dwBufferLength);
}

WinInet.InternetSetOption(IntPtr.Zero, WinInet.INTERNET_OPTION_SETTINGS_CHANGED, IntPtr.Zero, 0);
WinInet.InternetSetOption(IntPtr.Zero, WinInet.INTERNET_OPTION_REFRESH, IntPtr.Zero, 0);

But it doesn’t seem to be working. Reading up on INTERNET_OPTION_SETTINGS_CHANGED and INTERNET_OPTION_REFRESH at MSDN it looks like INTERNET_OPTION_REFRESH only refreshes the proxy data so I problably don’t need to be calling it. As far as INTERNET_OPTION_SETTINGS_CHANGED is concerned they mention “on the next call to InternetConnect” so I’m not clear when that would occur in an open browser. My other thought is that since I can’t find a was to set the script debugging settings using InternetSetOption then maybe an INTERNET_OPTION_SETTINGS_CHANGED won’t refresh those values.

IE Script Debugging Toggler 1.0.8.702

Wednesday, July 2nd, 2008

I’ve been doing a lot more AJAX development recently and was frustrated by how many steps (4-5 heh) it took to enable/disable script debugging in Internet Explorer. After a quick search I wasn’t able to find a tool to make enabling/disabling script debugging in IE simpler so I wrote IE Script Debugging Toggler. Follow the link for more details.

CC.USBHID 0.0.8.323 (.NET picoLCD “driver”)

Sunday, March 23rd, 2008

As part of my CC.PowerManager project I purchased a M200-LCD case from Mini-Box.com and wanted to be able to write to the display from my .NET application. The manufacturer provides a C++ source code example that I was able to walk through and create a .NET alternative using Visual C#. In it’s current release CC.USBHID allows .NET developers to easily connect to and control a picoLCD device and provides a good start to communicate with other USB HID devices. Read more here.

.NET Micro Framework and CC.PowerManager

Monday, March 17th, 2008

Recently I started a project tenatively named CC.PowerManager. This project will consist of client/server software and is designed to control the AC power distribution to each component in my entertainment center. Allowing me to cut the power to each device to eliminate their current draw while “Off”. The client software will run on an embedded computer and use GPIOs to toggle relays connected to each power outlet. I wanted to start “simple” so I purchased an alix1c from PC Engines which should allow me to run Windows XP and play on familiar ground. Turns out a buddy at work is also working on a similiar project and is more in the know than I as he recently pointed me towards the .NET Micro Framework which looks pretty slick.

WMReboot 1.0

Thursday, November 22nd, 2007

WMReboot 0.2 seemed to take too long to load for what it’s function was. I figured if someone needs to reboot their device they want to do it quickly. For that reason I rewrote WMReboot as a Visual C# console application to greatly decrease the load time. It would problably run faster if I used C++ but I’m more comfortable in the managed code arena so we’ll take things one step at a time :-) Read more here.

WMStopWatch 0.6

Thursday, November 22nd, 2007

Quick release of WMStopWatch to fix the issues caused in the 0.5 release. Read more here.

WMStopWatch 0.5

Thursday, November 22nd, 2007

I’ve released a new version of WMStopWatch that adds a countdown mode. The countdown mode allows you to set a time and optionally a wav file. When the timer reaches the countdown time the default system beep or the configured wav file is played. Read more here.

Process Manager 0.1

Saturday, September 8th, 2007

ProcessManager is a simple task manager for Windows Mobile devices. I wrote it to test my CC.System.Diagnostics class library. Download the application here.

CC.System.Diagnostics 0.1

Saturday, September 8th, 2007

I needed a way to find a process by it’s name on my Motorola Q so I modified some example code provided by Microsoft and wrote this simple class library. You can read more about the details here.

WMStopWatch 0.4

Thursday, September 6th, 2007

I wasn’t happy that versions 0.3 and below only supported a resolution of ~1 second so I have released an updated version that supports millisecond resolution (more if I wanted and your device supports it). Also added options to control the background and foreground colors and tried to fix an issue on Pocket PCs where “closing” the application minimized it (waiting on feedback, don’t have a Pocket PC to test on). Read more here.