<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>soundripple</title>
	<atom:link href="http://soundripple.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://soundripple.com</link>
	<description>it&#039;s all just data</description>
	<lastBuildDate>Wed, 24 Aug 2011 14:50:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='soundripple.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>soundripple</title>
		<link>http://soundripple.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://soundripple.com/osd.xml" title="soundripple" />
	<atom:link rel='hub' href='http://soundripple.com/?pushpress=hub'/>
		<item>
		<title>Scaling Textile Image Links</title>
		<link>http://soundripple.com/2011/06/16/scaling-textile-image-links/</link>
		<comments>http://soundripple.com/2011/06/16/scaling-textile-image-links/#comments</comments>
		<pubDate>Thu, 16 Jun 2011 13:51:41 +0000</pubDate>
		<dc:creator>soundripple</dc:creator>
				<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://soundripple.com/?p=195</guid>
		<description><![CDATA[This is something that has been driving me crazy; plenty of sites (including Basecamp) use Textile still, and I often want to link an image in without formally downloading it, resizing it and re-uploading it. All the Textile examples I found all show how to display an image inline via a URL, but none of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=soundripple.com&amp;blog=6360666&amp;post=195&amp;subd=soundripple&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is something that has been driving me crazy; plenty of sites (including <a title="Basecamp" href="http://basecamphq.com/" target="_blank">Basecamp</a>) use Textile still, and I often want to link an image in without formally downloading it, resizing it and re-uploading it.</p>
<p>All the Textile examples I found all show how to display an image inline via a URL, but none of them show how to resize the image, at least not in a fashion I could make work.  Some digging finally turned this up, and I figured I&#8217;d post this here for when I forget next time, and in case it&#8217;s useful for someone else.</p>
<p>A plain image is linked in as follows:</p>
<pre>!http://farm6.static.flickr.com/5306/5627310027_eb64230826_t.jpg!</pre>
<p>Resulting in:  <img src="http://farm6.static.flickr.com/5306/5627310027_eb64230826_t.jpg" alt="" /></p>
<p>To force a specific size:</p>
<pre>!{width: 50px; height: 33px;}http://farm6.static.flickr.com/5306/5627310027_eb64230826_t.jpg!</pre>
<p>Resulting in:  <img src="http://farm6.static.flickr.com/5306/5627310027_eb64230826_t.jpg" alt="" width="50" height="33" /></p>
<p>Whoosh!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/soundripple.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/soundripple.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/soundripple.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/soundripple.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/soundripple.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/soundripple.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/soundripple.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/soundripple.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/soundripple.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/soundripple.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/soundripple.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/soundripple.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/soundripple.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/soundripple.wordpress.com/195/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=soundripple.com&amp;blog=6360666&amp;post=195&amp;subd=soundripple&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://soundripple.com/2011/06/16/scaling-textile-image-links/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fe7f2c030846844c6ffd78c8dc099f7e?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif&#38;r=PG" medium="image">
			<media:title type="html">soundripple</media:title>
		</media:content>

		<media:content url="http://farm6.static.flickr.com/5306/5627310027_eb64230826_t.jpg" medium="image" />

		<media:content url="http://farm6.static.flickr.com/5306/5627310027_eb64230826_t.jpg" medium="image" />
	</item>
		<item>
		<title>Feet wet with the Arduino: Debouncing</title>
		<link>http://soundripple.com/2011/01/03/feet-wet-with-the-arduino-debouncing/</link>
		<comments>http://soundripple.com/2011/01/03/feet-wet-with-the-arduino-debouncing/#comments</comments>
		<pubDate>Mon, 03 Jan 2011 20:39:46 +0000</pubDate>
		<dc:creator>soundripple</dc:creator>
				<category><![CDATA[arduino]]></category>

		<guid isPermaLink="false">http://soundripple.com/?p=158</guid>
		<description><![CDATA[My lovely family got me for Xmas this year an Arduino Uno, and some associated bits like a breadboard.  I&#8217;ve always been interested in how things work, but intimidated by component-level electronics, so I figured this would be a good place to get over it and learn something at the same time. I&#8217;d already done [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=soundripple.com&amp;blog=6360666&amp;post=158&amp;subd=soundripple&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>My lovely family got me for Xmas this year an <a title="The Uno" href="http://arduino.cc/en/Main/ArduinoBoardUno">Arduino Uno</a>, and some associated bits like a <a title="Breadboard" href="http://www.amazon.com/BB400-Solderless-Plug--BreadBoard-tie-points/dp/B0040Z1ERO">breadboard</a>.  I&#8217;ve always been interested in how things work, but intimidated by component-level electronics, so I figured this would be a good place to get over it and learn something at the same time.</p>
<p>I&#8217;d already done a bunch of reading, including the <a title="Getting Started with Arduino" href="http://www.amazon.com/SparkFun-Getting-Started-with-Arduino/dp/B004G52OJA">Getting Started</a> guide (thanks, Douggie, Hannah!), so next came a quick trip to RadioShack, where I rifled through their parts bins looking for anything interesting to hook up.  Maybe not the <a title="Digi-Key: awesome stuff!" href="http://search.digikey.com/scripts/DkSearch/dksus.dll?WT.z_homepage_link=hp_ProductIndex&amp;lang=en&amp;site=US&amp;keywords=">cheapest solution</a>, but it was a neat experience to be able to dig through and find stuff that <em>might</em> be fun to hook up, but not be sure what it&#8217;s useful for yet.  In a  world where everything you buy has an exact purpose, and generally only  one way of hooking it up, it was an eyeopener!</p>
<div id="attachment_164" class="wp-caption alignright" style="width: 310px"><img class="size-full wp-image-164 " title="Button and two LEDs" src="http://soundripple.files.wordpress.com/2011/01/components.png?w=497" alt="Button and two LEDs"   /><p class="wp-caption-text">Small beginnings</p></div>
<p>Among other things I ended up with a couple of plain old green LEDs, and a momentary switch (<a title="275-646" href="http://www.radioshack.com/product/index.jsp?productId=2062510">275-646</a>).  I had to crimp the switch&#8217;s legs with a pair of pliers to get them to fit into my breadboard, since in my RadioShack fugue I wasn&#8217;t savvy enough to imagine this might be something I&#8217;d want to do.</p>
<p>I&#8217;ve done some programming, and am comfortable digging and researching until I understand something, so I was happy enough with the coding side of it &#8211; which in fact is very similar to c#, given its c / c++ heritage.  Something that fascinates me is that in coding, everything is very deterministic most of the time, but in hardware, there was a whole side I&#8217;d never guessed at; contacts can &#8216;<a title="wtf is bounce?" href="http://en.wikipedia.org/wiki/Contact_bounce#Contact_bounce">bounce</a>&#8216;, or a potentiometer can flick back and forth between two values, or any number of other mysterious and distressing behaviours can manifest.  I decided to combine the LEDs and a button, and explore the whole thing to get a better handle on it.</p>
<p>Every Arduino LED tutorial starts off with a LED (or two), and indicates you needed a resistor in line with each LED.  A bit of digging turned up the underlying reason: the LEDs just don&#8217;t handle the current that results from a 5V source.  That&#8217;s probably not exactly worded correctly, and of course <a title="the REAL reason" href="http://tinkerlog.com/2009/04/05/driving-an-led-with-or-without-a-resistor/">there&#8217;s more to it than that</a>, but the end result is that I needed 100 ohm resistors in series with each LED.  The resistance calculation was pretty straightforward using a <a title="LED calculator from the LED Center" href="http://led.linear1.org/1led.wiz?VS=5;VF=2.1;ID=30">handy online calculator</a>; doing it manually is a bit more work, but definitely useful.  It took me a while to find a site that actually <a title="the maths" href="http://colourclassicfaq.com/general/led.html">explains the calculation</a>, which works out as follows:</p>
<p>The Arduino&#8217;s digital pins provide 5V, and my LEDs have a forward voltage (voltage level needed to make them light) of 2.1 volts.  So we need to reduce the 5V DOWN to 2.1V, i.e. reduce it by 2.9V &#8211; this is the amount the resistor has to drop the voltage by.  The LEDs have a forward current (how much current we want to drive through the LED) of 30 mA.</p>
<p>So for the resistor, since V=IR, i.e. 2.9 = (0.030 * R), then R = 2.9 ÷ 0.030 = 96.6667.  The next &#8216;size up&#8217; for resistors is 100Ω, so we select that. Whew!</p>
<p>The only other thing that I found non-intuitive is that I needed a resistor between the switch and ground.  After some research to understand it, I found it helps to think of it this way: When the switch is open, the digital pin &#8216;sees&#8217; the ground normally, through the resistor.  In this case, the resistor is redundant; there&#8217;s only one path, so the digital pin is &#8216;low&#8217;.  When the switch is <em>closed</em>, however, the pin can see two paths; one to ground, and one to the 5V source.  The fact that one path (the ground path) has a resistor causes the pin to have a &#8216;preferred path&#8217; the other way, through to the 5V source &#8211; i.e. the resistor on the &#8216;ground path&#8217; makes it a less &#8216;desirable&#8217; path.  I&#8217;m sure that&#8217;s not technically accurate, but it makes it easier for me to remember!</p>
<p>So, the circuit looks like this in <a title="the one tool that can tidy up my mess" href="http://fritzing.org/">Fritzing</a>:</p>
<p style="text-align:center;">&nbsp;</p>
<div id="attachment_178" class="wp-caption aligncenter" style="width: 421px"><a href="http://soundripple.files.wordpress.com/2011/01/breadboard.png"><img class="size-full wp-image-178 " title="breadboard" src="http://soundripple.files.wordpress.com/2011/01/breadboard.png?w=497" alt="The tidy version - thanks Fritzing!"   /></a><p class="wp-caption-text">The tidy version - thanks Fritzing!</p></div>
<p>And less attractive, but keepin&#8217; it real:</p>
<div class="wp-caption aligncenter" style="width: 510px"><a href="http://www.flickr.com/photos/cloudmonkey/5320063683/"><img title="The Board" src="http://farm6.static.flickr.com/5123/5320063683_a4365b2c92.jpg" alt="The Board" width="500" height="334" /></a><p class="wp-caption-text">All good!</p></div>
<p>The Arduino code to control all this is as follows:</p>
<pre><code><pre class="brush: cpp; wrap-lines: false;">const int led0Pin = 11;            // LED1 is connected to pin 11
const int led1Pin = 12;            // LED2 is connected to pin 12
const int btnPin = 2;              // Momentary button is connected to pin 2
const int minTime = 30;            // The minimum time the button must be pressed (in ms) before we consider it a valid press
int lastReadBtnState;              // Used to store the last state that we read from the button (this could flop all over the place)
int acceptedBtnState;              // Used to store the last ACCEPTED state that we read from the button (this should be very stable)
int ledLit = 0;                    // Which LED is lit; 0 = led0, 1 = led1
unsigned long lastChangeTime;      // Used to store the last time that we observed a change in the button's state
boolean inTransition = false;      // If this is true, we've observed a button change, and are waiting to see if it is stable

void setup()
{
Serial.begin(9600);                      // Initialise the serial output so that we can write out debug messages
pinMode(led0Pin, OUTPUT);                // Set the LED0 pin as output
pinMode(led1Pin, OUTPUT);                // Set the LED1 pin as output
pinMode(btnPin, INPUT);                  // Set the button pin as input
acceptedBtnState = digitalRead(btnPin);  // Initialise the stable button state to whatever state it actually is
lastReadBtnState = acceptedBtnState;     // Indicate that we're in a stable state
}

void loop()
{
lastReadBtnState = digitalRead(btnPin);
if (!inTransition &amp;amp;&amp;amp; (lastReadBtnState != acceptedBtnState))
// Bam, we registered a button state change
{
lastChangeTime = millis();  // Mark the time we observed the change
inTransition = true;        // Note that we're now in a transition state
Serial.println(&quot;Button state changed from &quot; + StateToStr(acceptedBtnState) + &quot; to &quot; + StateToStr(lastReadBtnState) + &quot;.  Going into transition&quot;);
}
else if (inTransition &amp;amp;&amp;amp; ((millis() - lastChangeTime) &amp;gt; minTime))
// The button state hasn't changed for at least minTime milliseconds, so assume we're stable now
{
Serial.println(&quot;Met minimum time requirement: going from &quot; + StateToStr(acceptedBtnState) + &quot; to &quot; + StateToStr(lastReadBtnState));
if (lastReadBtnState == LOW)
// Only toggle the LED if the button is in a LOW state
{
Serial.println(&quot;New state is LOW; toggling LED&quot;);
ledLit = 1 - ledLit;
}
// Move the last-read value into the accepted state variable
acceptedBtnState = lastReadBtnState;
// Note that we're no longer in transition
inTransition = false;
}

// Turn on the appropriate LED
if (ledLit == 0)
{
digitalWrite(led0Pin, HIGH);
digitalWrite(led1Pin, LOW);
}
else
{
digitalWrite(led0Pin, LOW);
digitalWrite(led1Pin, HIGH);
}
}

String StateToStr(int AState)
// Given a pin state variable, returns a text equivalent of its value
{
return (AState == HIGH ? &quot;HIGH&quot; : &quot;LOW&quot;);
}
</pre>

 </code></pre>
<p>The LEDs alternate smoothly when the button is pressed, so mission accomplished.  Back to the sack of goodies to see what&#8217;s next!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/soundripple.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/soundripple.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/soundripple.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/soundripple.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/soundripple.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/soundripple.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/soundripple.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/soundripple.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/soundripple.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/soundripple.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/soundripple.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/soundripple.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/soundripple.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/soundripple.wordpress.com/158/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=soundripple.com&amp;blog=6360666&amp;post=158&amp;subd=soundripple&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://soundripple.com/2011/01/03/feet-wet-with-the-arduino-debouncing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fe7f2c030846844c6ffd78c8dc099f7e?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif&#38;r=PG" medium="image">
			<media:title type="html">soundripple</media:title>
		</media:content>

		<media:content url="http://soundripple.files.wordpress.com/2011/01/components.png" medium="image">
			<media:title type="html">Button and two LEDs</media:title>
		</media:content>

		<media:content url="http://soundripple.files.wordpress.com/2011/01/breadboard.png" medium="image">
			<media:title type="html">breadboard</media:title>
		</media:content>

		<media:content url="http://farm6.static.flickr.com/5123/5320063683_a4365b2c92.jpg" medium="image">
			<media:title type="html">The Board</media:title>
		</media:content>
	</item>
		<item>
		<title>VBA Date Picker</title>
		<link>http://soundripple.com/2010/06/28/vba-date-picker/</link>
		<comments>http://soundripple.com/2010/06/28/vba-date-picker/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 16:47:33 +0000</pubDate>
		<dc:creator>soundripple</dc:creator>
				<category><![CDATA[vba]]></category>

		<guid isPermaLink="false">http://soundripple.com/?p=148</guid>
		<description><![CDATA[I often work within the suffocating constraints of VBA (in my case, a derivative called WinWrap), and the control set is fairly limited. I often poke around in the Windows API looking for better ways to do things, and today I put together some old code and set up a routine to display a date [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=soundripple.com&amp;blog=6360666&amp;post=148&amp;subd=soundripple&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I often work within the suffocating constraints of VBA (in my case, a derivative called WinWrap), and the control set is fairly limited.</p>
<p>I often poke around in the Windows API looking for better ways to do things, and today I put together some old code and set up a routine to display a date picker control on a dialog &#8211; and was almost surprised when it worked.</p>
<p>The trick is to use CreateWindowEx to create the date control, and SendMessage to set and read the value, with the rest just being VBA/API plumbing.</p>
<p>Note that the code below expects pixel coordinates for the control position instead of the funky values used by WinWrap.</p>
<p>Here&#8217;s the complete source:</p>
<p><pre class="brush: vb;">
Option Explicit
Private Type SYSTEMTIME
   wYear As Integer
   wMonth As Integer
   wDayOfWeek As Integer
   wDay As Integer
   wHour As Integer
   wMinute As Integer
   wSecond As Integer
   wMilliseconds As Integer
End Type

Declare Function CreateWindowEx Lib &quot;user32&quot; Alias &quot;CreateWindowExA&quot; ( _
      ByVal dwExStyle As Long, _
      ByVal lpClassName As String, _
      ByVal lpWindowName As String, _
      ByVal dwStyle As Long, _
      ByVal x As Long, _
      ByVal y As Long, _
      ByVal nWidth As Long, _
      ByVal nHeight As Long, _
      ByVal hWndParent As Long, _
      ByVal hMenu As Long, _
      ByVal hInstance As Long, _
      lpParam As Any) As Long

Private Declare Function DestroyWindow Lib &quot;user32&quot; (ByVal hwnd As Long) As Long
Private Declare Function SendMessage Lib &quot;user32.dll&quot; (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByRef lParam As SYSTEMTIME) As Long

Private Const DTM_GETSYSTEMTIME As Long = &amp;H1001
Private Const DTM_SETSYSTEMTIME As Long = &amp;H1002
Private Const DATETIMEPICK_CLASS = &quot;SysDateTimePick32&quot;
Private Const WS_BORDER As Long = &amp;H800000
Private Const WS_CHILD As Long = 1073741824
Private Const WS_VISIBLE As Long = 268435456

Private hWndDatePicker As Long

Sub Main
   Begin Dialog UserDialog 160,77,.evMain ' %GRID:10,7,1,1
      OKButton 40,42,90,21
   End Dialog
   Dim dlg As UserDialog
   Dialog dlg
End Sub

Rem See DialogFunc help topic for more information.
Private Function evMain(DlgItem$, Action%, SuppValue?) As Boolean
   Select Case Action%
   Case 1 ' Dialog box initialization
      hWndDatePicker = CreateDateControl SuppValue&amp;, 10, 10, 100, 25
      SetDateControl hWndDatePicker, #12/25/2012#
    Case 2 ' Value changing or button pressed
      Dim pickedDate As Date
      pickedDate = ReadDateControl(hWndDatePicker)
      MsgBox &quot;You selected: &quot; + CStr(pickedDate)
       DestroyWindow hWndDatePicker
      Rem evMain = True ' Prevent button press from closing the dialog box
   Case 3 ' TextBox or ComboBox text changed
   Case 4 ' Focus changed
   Case 5 ' Idle
      Rem Wait .1 : evMain = True ' Continue getting idle actions
   Case 6 ' Function key
   End Select
End Function

Sub SetDateControl(ControlHWnd As Long, AValue As Date)
   Dim wMsg As Long
   Dim wParam As Long
   Dim lParam As SYSTEMTIME
   Dim result As Long

   wMsg = DTM_SETSYSTEMTIME
   wParam = 0
   With lParam
      .wYear = Year(AValue)
      .wMonth = Month(AValue)
      .wDay = Day(AValue)
      .wHour = Hour(AValue)
      .wMinute = Minute(AValue)
      .wSecond = Second(AValue)
      .wMilliseconds = 0      'not supported in Date type
   End With

   SendMessage(hWndDatePicker, wMsg, wParam, lParam)
End Sub

Function ReadDateControl(ControlHWnd As Long) As Date
   Dim wMsg As Long
   Dim wParam As Long
   Dim lParam As SYSTEMTIME
   Dim result As Long

   wMsg = DTM_GETSYSTEMTIME
   wParam = 0
   SendMessage(hWndDatePicker, wMsg, wParam, lParam)
   With lParam
      result = CDate(CStr(.wMonth) + &quot;/&quot; + CStr(.wDay) + &quot;/&quot; + CStr(.wYear))
   End With
   ReadDateControl = result
End Function

Function CreateDateControl(DlgHWnd As Long, AX As Long, AY As Long, ADX As Long, ADY As Long) As Long
   Dim dwExStyle As Long
   Dim lpClassName As String
    Dim lpWindowName As String
    Dim dwStyle As Long
    Dim x As Long
    Dim y As Long
    Dim nWidth As Long
    Dim nHeight As Long
    Dim hWndParent As Long
    Dim hMenu As Long
    Dim hInstance As Long
    Dim lpParam As Long

   dwExStyle = 0
   lpClassName = DATETIMEPICK_CLASS
   lpWindowName = &quot;&quot;
   dwStyle = WS_BORDER Or WS_CHILD Or WS_VISIBLE
   hWndParent = DlgHWnd
   hMenu = vbNull
   hInstance = MainFormHandle
   lpParam = vbNull
   CreateDateControl = CreateWindowEx(dwExStyle, lpClassName, lpWindowName, dwStyle, AX, AY, ADX, ADY, hWndParent, hMenu, hInstance, lpParam)
End Function

</pre></p>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:2304px;width:1px;height:1px;overflow:hidden;">Option Explicit<br />
Private Type SYSTEMTIME<br />
wYear As Integer<br />
wMonth As Integer<br />
wDayOfWeek As Integer<br />
wDay As Integer<br />
wHour As Integer<br />
wMinute As Integer<br />
wSecond As Integer<br />
wMilliseconds As Integer<br />
End Type</p>
<p>Declare Function CreateWindowEx Lib &#8220;user32&#8243; Alias &#8220;CreateWindowExA&#8221; ( _<br />
ByVal dwExStyle As Long, _<br />
ByVal lpClassName As String, _<br />
ByVal lpWindowName As String, _<br />
ByVal dwStyle As Long, _<br />
ByVal x As Long, _<br />
ByVal y As Long, _<br />
ByVal nWidth As Long, _<br />
ByVal nHeight As Long, _<br />
ByVal hWndParent As Long, _<br />
ByVal hMenu As Long, _<br />
ByVal hInstance As Long, _<br />
lpParam As Any) As Long</p>
<p>Private Declare Function DestroyWindow Lib &#8220;user32&#8243; (ByVal hwnd As Long) As Long<br />
&#8216;Private Declare Function DateTime_GetSystemtime Lib &#8220;Comctl32&#8243; (ByVal hwndDP As Long, ByRef lpSysTime As SYSTEMTIME) As Long<br />
Private Declare Function SendMessage Lib &#8220;user32.dll&#8221; (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByRef lParam As SYSTEMTIME) As Long</p>
<p>Private Const DTM_GETSYSTEMTIME As Long = &amp;H1001<br />
Private Const DTM_SETSYSTEMTIME As Long = &amp;H1002<br />
Private Const DATETIMEPICK_CLASS = &#8220;SysDateTimePick32&#8243;<br />
Private Const WS_BORDER As Long = &amp;H800000<br />
Private Const WS_CHILD As Long = 1073741824<br />
Private Const WS_VISIBLE As Long = 268435456</p>
<p>Private hWndDatePicker As Long</p>
<p>Sub Main<br />
Dim userChoice As Integer<br />
Begin Dialog UserDialog 160,77,.evMain &#8216; %GRID:10,7,1,1<br />
OKButton 40,42,90,21<br />
End Dialog<br />
Dim dlg As UserDialog<br />
Dialog dlg<br />
End Sub</p>
<p>Rem See DialogFunc help topic for more information.<br />
Private Function evMain(DlgItem$, Action%, SuppValue?) As Boolean<br />
Select Case Action%<br />
Case 1 &#8216; Dialog box initialization<br />
hWndDatePicker = CreateDateControl SuppValue&amp;, 10, 10, 100, 25<br />
SetDateControl hWndDatePicker, #12/25/2012#<br />
Case 2 &#8216; Value changing or button pressed<br />
&#8216;DateTime_GetSystemtime hWndDatePicker, pickedDate<br />
Dim pickedDate As Date<br />
pickedDate = ReadDateControl(hWndDatePicker)<br />
MsgBox &#8220;You selected: &#8221; + CStr(pickedDate)<br />
DestroyWindow hWndDatePicker<br />
Rem evMain = True &#8216; Prevent button press from closing the dialog box<br />
Case 3 &#8216; TextBox or ComboBox text changed<br />
Case 4 &#8216; Focus changed<br />
Case 5 &#8216; Idle<br />
Rem Wait .1 : evMain = True &#8216; Continue getting idle actions<br />
Case 6 &#8216; Function key<br />
End Select<br />
End Function</p>
<p>Sub SetDateControl(ControlHWnd As Long, AValue As Date)<br />
Dim wMsg As Long<br />
Dim wParam As Long<br />
Dim lParam As SYSTEMTIME<br />
Dim result As Long</p>
<p>wMsg = DTM_SETSYSTEMTIME<br />
wParam = 0<br />
With lParam<br />
.wYear = Year(AValue)<br />
.wMonth = Month(AValue)<br />
.wDay = Day(AValue)<br />
.wHour = Hour(AValue)<br />
.wMinute = Minute(AValue)<br />
.wSecond = Second(AValue)<br />
.wMilliseconds = 0      &#8216;not supported in Date type<br />
End With</p>
<p>SendMessage(hWndDatePicker, wMsg, wParam, lParam)<br />
End Sub</p>
<p>Function ReadDateControl(ControlHWnd As Long) As Date<br />
Dim wMsg As Long<br />
Dim wParam As Long<br />
Dim lParam As SYSTEMTIME<br />
Dim result As Long</p>
<p>wMsg = DTM_GETSYSTEMTIME<br />
wParam = 0<br />
SendMessage(hWndDatePicker, wMsg, wParam, lParam)<br />
With lParam<br />
result = CDate(CStr(.wMonth) + &#8220;/&#8221; + CStr(.wDay) + &#8220;/&#8221; + CStr(.wYear))<br />
End With<br />
ReadDateControl = result<br />
End Function</p>
<p>Function CreateDateControl(DlgHWnd As Long, AX As Long, AY As Long, ADX As Long, ADY As Long) As Long<br />
Dim dwExStyle As Long<br />
Dim lpClassName As String<br />
Dim lpWindowName As String<br />
Dim dwStyle As Long<br />
Dim x As Long<br />
Dim y As Long<br />
Dim nWidth As Long<br />
Dim nHeight As Long<br />
Dim hWndParent As Long<br />
Dim hMenu As Long<br />
Dim hInstance As Long<br />
Dim lpParam As Long</p>
<p>dwExStyle = 0<br />
lpClassName = DATETIMEPICK_CLASS<br />
lpWindowName = &#8220;&#8221;<br />
dwStyle = WS_BORDER Or WS_CHILD Or WS_VISIBLE<br />
hWndParent = DlgHWnd<br />
hMenu = vbNull<br />
hInstance = MainFormHandle<br />
lpParam = vbNull<br />
CreateDateControl = CreateWindowEx(dwExStyle, lpClassName, lpWindowName, dwStyle, AX, AY, ADX, ADY, hWndParent, hMenu, hInstance, lpParam)<br />
End Function</p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/soundripple.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/soundripple.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/soundripple.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/soundripple.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/soundripple.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/soundripple.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/soundripple.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/soundripple.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/soundripple.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/soundripple.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/soundripple.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/soundripple.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/soundripple.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/soundripple.wordpress.com/148/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=soundripple.com&amp;blog=6360666&amp;post=148&amp;subd=soundripple&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://soundripple.com/2010/06/28/vba-date-picker/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fe7f2c030846844c6ffd78c8dc099f7e?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif&#38;r=PG" medium="image">
			<media:title type="html">soundripple</media:title>
		</media:content>
	</item>
		<item>
		<title>Word 2007 Document Language Change</title>
		<link>http://soundripple.com/2009/10/21/word-2007-document-language-change/</link>
		<comments>http://soundripple.com/2009/10/21/word-2007-document-language-change/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 15:13:26 +0000</pubDate>
		<dc:creator>soundripple</dc:creator>
				<category><![CDATA[word]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[office]]></category>

		<guid isPermaLink="false">http://soundripple.com/?p=126</guid>
		<description><![CDATA[I frequently have to switch between working on documents for a UK/NZ/US audience, and often want to change the document&#8217;s language to match. Spelling has never been an issue for me, but there&#8217;s something just wrong with having the document set to a language different to what you&#8217;re writing.  Words like &#8216;colour&#8217; and &#8216;neighbour&#8217; get [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=soundripple.com&amp;blog=6360666&amp;post=126&amp;subd=soundripple&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I frequently have to switch between working on documents for a UK/NZ/US audience, and often want to change the document&#8217;s language to match.</p>
<p>Spelling has never been an issue for me, but there&#8217;s something just <em>wrong</em> with having the document set to a language different to what you&#8217;re writing.  Words like &#8216;colour&#8217; and &#8216;neighbour&#8217; get the annoying red squiggle, and it&#8217;s irritating that real typos get mixed in with the (ahem) original English spellings of words.  Every now and then I have to work out how to beat this, and I always forget, so think of this as a note-to-self that may be useful to others too.</p>
<p>Some googling will tell you that the most common solution is to do a select-all (ctrl-A), then use the language selector in the status bar (or in the Review ribbon).  This only sets the selected text, though, and you&#8217;ll have to re-do it every time you add new text.  How could that ever be good enough?</p>
<p>Another solution you&#8217;ll see is to change the default language for the Normal template by clicking the &#8216;Default&#8230;&#8217; button in the language dialog.  As far as I know, this will affect all new documents from that point on &#8211; obviously crazy talk.</p>
<p>Fortunately, there&#8217;s a way that feels a lot more <em>right</em>, in that it changes the entire document (but just the current document), and any new text that you add.  It&#8217;s easy to do at any time during the document editing process, and you don&#8217;t have to keep reapplying it.</p>
<p><strong>It just boils down to changing the Normal style for the current document.</strong> Not for the next document, or all future documents, or all the documents in your housing subdivision&#8230; just for this one.  Steps are easy:</p>
<p>1. From the &#8216;Home&#8217; ribbon, open the style editor:</p>
<p style="text-align:center;">
<div id="attachment_127" class="wp-caption aligncenter" style="width: 510px"><img class="size-full wp-image-127 " title="Step 1" src="http://soundripple.files.wordpress.com/2009/10/language_change_step01.png?w=497" alt="Open the Style Editor"   /><p class="wp-caption-text">Open the Style Editor</p></div>
<p>2. Modify the Normal style:</p>
<div id="attachment_128" class="wp-caption aligncenter" style="width: 301px"><img class="size-full wp-image-128" title="Step 2" src="http://soundripple.files.wordpress.com/2009/10/language_change_step02.png?w=497" alt="Modify the Normal Style"   /><p class="wp-caption-text">Modify the Normal Style</p></div>
<p>3. Change the language:</p>
<div id="attachment_129" class="wp-caption aligncenter" style="width: 349px"><img class="size-full wp-image-129" title="Step 3" src="http://soundripple.files.wordpress.com/2009/10/language_change_step03.png?w=497" alt="Change the language"   /><p class="wp-caption-text">Change the language</p></div>
<p>Select the language you need, and you&#8217;ll notice that it appears in the description of the style (see the screenshot above).  A nice side affect is that most (all?) of the other styles are based on Normal, so they get the change too.</p>
<p>Finally, just OK your way back out to the document.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/soundripple.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/soundripple.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/soundripple.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/soundripple.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/soundripple.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/soundripple.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/soundripple.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/soundripple.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/soundripple.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/soundripple.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/soundripple.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/soundripple.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/soundripple.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/soundripple.wordpress.com/126/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=soundripple.com&amp;blog=6360666&amp;post=126&amp;subd=soundripple&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://soundripple.com/2009/10/21/word-2007-document-language-change/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fe7f2c030846844c6ffd78c8dc099f7e?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif&#38;r=PG" medium="image">
			<media:title type="html">soundripple</media:title>
		</media:content>

		<media:content url="http://soundripple.files.wordpress.com/2009/10/language_change_step01.png" medium="image">
			<media:title type="html">Step 1</media:title>
		</media:content>

		<media:content url="http://soundripple.files.wordpress.com/2009/10/language_change_step02.png" medium="image">
			<media:title type="html">Step 2</media:title>
		</media:content>

		<media:content url="http://soundripple.files.wordpress.com/2009/10/language_change_step03.png" medium="image">
			<media:title type="html">Step 3</media:title>
		</media:content>
	</item>
		<item>
		<title>Calculated Outlook Column: Lag</title>
		<link>http://soundripple.com/2009/08/11/calculated-outlook-column-lag/</link>
		<comments>http://soundripple.com/2009/08/11/calculated-outlook-column-lag/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 19:33:21 +0000</pubDate>
		<dc:creator>soundripple</dc:creator>
				<category><![CDATA[outlook]]></category>

		<guid isPermaLink="false">http://soundripple.com/?p=115</guid>
		<description><![CDATA[We recently started getting a slowdown in our mail at work, and didn&#8217;t spot it until people started calling (and even sending other emails) to ask the singularly most overused question of all time: &#8220;Did you get my email?&#8221; I figured it must be easy enough to display the message lag in Outlook somehow, so [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=soundripple.com&amp;blog=6360666&amp;post=115&amp;subd=soundripple&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="attachment_121" class="wp-caption alignright" style="width: 294px"><img class="size-full wp-image-121 " title="Lag Field" src="http://soundripple.files.wordpress.com/2009/08/outlook_lag_result.png?w=497" alt="Lag Field"   /><p class="wp-caption-text">Lag Field</p></div>
<p>We recently started getting a slowdown in our mail at work, and didn&#8217;t spot it until people started calling (and even sending other emails) to ask the singularly most overused question of all time: &#8220;Did you get my email?&#8221;</p>
<p>I figured it must be easy enough to display the message lag in Outlook somehow, so that performance problems become more apparent.  It turns out to be even easier than you&#8217;d expect; all you need is a calculated field to display the difference between the Sent and Received fields:</p>
<p>Note:</p>
<ul>
<li>&#8216;Sent&#8217; means the time that the sender&#8217;s client (e.g. Outlook) sent the message, and it is displayed in your local time zone.  Technical description <a href="http://msdn.microsoft.com/en-us/library/cc839781.aspx">here</a>.</li>
<li>&#8216;Received&#8217; means the time that the message hit your mail server (in our case this is Exchange), and is also displayed in your local time zone.  Technical description <a href="http://msdn.microsoft.com/en-us/library/cc841961.aspx">here</a>.</li>
</ul>
<p>I&#8217;m working in Outlook 2007, so the screens below may look slightly different at your end.</p>
<p>I set the field to show as &#8216;h:mm:ss&#8217;, but of course this could be shown in any number of ways.</p>
<p>Step 1: Create a new user-defined field.  Right-click anywhere in the header bar and select &#8220;Field Chooser&#8221;:</p>
<div id="attachment_116" class="wp-caption aligncenter" style="width: 302px"><img class="size-full wp-image-116" title="Step 1" src="http://soundripple.files.wordpress.com/2009/08/outlook_lag_step01.png?w=497" alt="Step 1"   /><p class="wp-caption-text">Step 1</p></div>
<p>Step 2: In the Field Chooser, select &#8221; User-defined fields in folder&#8221; (or &#8220;&#8230;in Inbox&#8221; if you&#8217;re working in the inbox):</p>
<div id="attachment_117" class="wp-caption aligncenter" style="width: 204px"><img class="size-full wp-image-117" title="Step 2" src="http://soundripple.files.wordpress.com/2009/08/outlook_lag_step02.png?w=497" alt="outlook_lag_step02"   /><p class="wp-caption-text">Step 2</p></div>
<p style="text-align:center;">
<p>Step 3: Name the new field &#8220;Lag&#8221; (or whatever you prefer), and select a type of &#8216;Formula&#8217;:</p>
<div id="attachment_118" class="wp-caption aligncenter" style="width: 304px"><img class="size-full wp-image-118" title="Step 3" src="http://soundripple.files.wordpress.com/2009/08/outlook_lag_step03.png?w=497" alt="Step 3"   /><p class="wp-caption-text">Step 3</p></div>
<p>Step 4: Paste in the following formula:<br />
<code>format(Hour([Received]-[Sent]),"0") &amp; ":" &amp; Format(Minute([Received]-[Sent]),"00") &amp; ":" &amp; format(Second([Received]-[Sent]),"00")</code></p>
<div id="attachment_119" class="wp-caption aligncenter" style="width: 425px"><img class="size-full wp-image-119" title="Step 4" src="http://soundripple.files.wordpress.com/2009/08/outlook_lag_step04.png?w=497" alt="Step 4"   /><p class="wp-caption-text">Step 4</p></div>
<p>Step 5: Drop the new field into your header bar, wherever you want it to display:</p>
<div id="attachment_120" class="wp-caption aligncenter" style="width: 363px"><img class="size-full wp-image-120" title="Step 5" src="http://soundripple.files.wordpress.com/2009/08/outlook_lag_step05.png?w=497" alt="Step 5"   /><p class="wp-caption-text">Step 5</p></div>
<p>From there, you should be able to see the new &#8216;Lag&#8217; column.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/soundripple.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/soundripple.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/soundripple.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/soundripple.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/soundripple.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/soundripple.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/soundripple.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/soundripple.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/soundripple.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/soundripple.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/soundripple.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/soundripple.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/soundripple.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/soundripple.wordpress.com/115/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=soundripple.com&amp;blog=6360666&amp;post=115&amp;subd=soundripple&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://soundripple.com/2009/08/11/calculated-outlook-column-lag/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fe7f2c030846844c6ffd78c8dc099f7e?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif&#38;r=PG" medium="image">
			<media:title type="html">soundripple</media:title>
		</media:content>

		<media:content url="http://soundripple.files.wordpress.com/2009/08/outlook_lag_result.png" medium="image">
			<media:title type="html">Lag Field</media:title>
		</media:content>

		<media:content url="http://soundripple.files.wordpress.com/2009/08/outlook_lag_step01.png" medium="image">
			<media:title type="html">Step 1</media:title>
		</media:content>

		<media:content url="http://soundripple.files.wordpress.com/2009/08/outlook_lag_step02.png" medium="image">
			<media:title type="html">Step 2</media:title>
		</media:content>

		<media:content url="http://soundripple.files.wordpress.com/2009/08/outlook_lag_step03.png" medium="image">
			<media:title type="html">Step 3</media:title>
		</media:content>

		<media:content url="http://soundripple.files.wordpress.com/2009/08/outlook_lag_step04.png" medium="image">
			<media:title type="html">Step 4</media:title>
		</media:content>

		<media:content url="http://soundripple.files.wordpress.com/2009/08/outlook_lag_step05.png" medium="image">
			<media:title type="html">Step 5</media:title>
		</media:content>
	</item>
		<item>
		<title>Registering DLLs in Vista x64</title>
		<link>http://soundripple.com/2009/07/16/registering-dlls-in-vista-x64/</link>
		<comments>http://soundripple.com/2009/07/16/registering-dlls-in-vista-x64/#comments</comments>
		<pubDate>Thu, 16 Jul 2009 15:24:44 +0000</pubDate>
		<dc:creator>soundripple</dc:creator>
				<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://soundripple.com/?p=110</guid>
		<description><![CDATA[I recently migrated from 32-bit XP to 64-bit Vista. It was a bit of a shock, and I&#8217;m still trying to find my way around some of the differences; One of the more problematic issues I found is setting up legacy 32-bit apps, since these have DLLs that need to go into the appropriate System [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=soundripple.com&amp;blog=6360666&amp;post=110&amp;subd=soundripple&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I recently migrated from 32-bit XP to 64-bit Vista.  It was a bit of a shock, and I&#8217;m still trying to find my way around some of the differences; One of the more problematic issues I found is setting up legacy 32-bit apps, since these have DLLs that need to go into the appropriate System folder.  The app that prompted this post uses a batch file to copy DLL and OCX files into C:\Windows\System32, then uses the system reg tool to register the files.</p>
<p>In 32-bit XP, you have:<br />
C:\Windows\System <em>- contains 16-bit system files</em><br />
C:\Windows\System32 <em>- contains 32-bit system files</em></p>
<p>In 64-bit Vista, you have:<br />
C:\Windows\System32 <em>- contains 64-bit system files</em><br />
C:\Windows\SysWOW64 <em>- contains 32-bit system files</em></p>
<p>Niiiice.</p>
<p>First thing was getting an easy way to run the RegSvr32.exe elevated, easily.<br />
I ended up copying the entire file from<br />
C:\Windows\System32\regsvr32.exe<br />
to<br />
C:\Users\\AppData\Roaming\Microsoft\Windows\SendTo\regsvr32.exe</p>
<p>I then edited the properties (of the copy in SendTo) to &#8216;Run as Administrator&#8217;.<br />
Then, to register anything, just select the DLL or OCX file, right-click, Send To, regsvr32.exe.  You can even select more than one file at a time, and you only get the one UAC prompt.</p>
<p>Next issue was the location for files.  The app I installed copied all its DLLs and OCXs into System32, and then promptly failed when it tried to register them, with:<br />
<code>LoadLibrary failed : 0x8007007E (The specified module could not be found. )</code></p>
<p>I found the solution to this was to move the files from System32 into SysWOW64.  Then, the register action magically worked.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/soundripple.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/soundripple.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/soundripple.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/soundripple.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/soundripple.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/soundripple.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/soundripple.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/soundripple.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/soundripple.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/soundripple.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/soundripple.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/soundripple.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/soundripple.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/soundripple.wordpress.com/110/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=soundripple.com&amp;blog=6360666&amp;post=110&amp;subd=soundripple&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://soundripple.com/2009/07/16/registering-dlls-in-vista-x64/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fe7f2c030846844c6ffd78c8dc099f7e?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif&#38;r=PG" medium="image">
			<media:title type="html">soundripple</media:title>
		</media:content>
	</item>
		<item>
		<title>Moving to Origin in AutoCAD</title>
		<link>http://soundripple.com/2009/06/23/moving-to-origin-in-autocad/</link>
		<comments>http://soundripple.com/2009/06/23/moving-to-origin-in-autocad/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 22:11:54 +0000</pubDate>
		<dc:creator>soundripple</dc:creator>
				<category><![CDATA[CAD]]></category>

		<guid isPermaLink="false">http://soundripple.com/?p=107</guid>
		<description><![CDATA[This is something that drives me nuts every time I try to do it. Our AutoCAD guy is kind enough to show me the solution every time I hit it (because my memory is so fantastic), but I figured that THIS time I&#8217;ll blog it so I can look it up next time I forget. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=soundripple.com&amp;blog=6360666&amp;post=107&amp;subd=soundripple&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is something that drives me nuts every time I try to do it.  Our AutoCAD guy  is kind enough to show me the solution every time I hit it (because my memory is so fantastic), but I figured that THIS time I&#8217;ll blog it so I can look it up next time I forget.</p>
<p>If you have something that you are trying to move to (0,0), you would THINK you just have to select it, type &#8216;M&#8217; for move, hit space, and enter &#8217;0&#8242;, comma, &#8217;0&#8242;, enter.</p>
<p>Bizarrely enough, it doesn&#8217;t, and I&#8217;ve even seen experienced AutoCAD dudes stumped by it.  The answer is simple: turn off Dynamic Input, either by clicking on the &#8216;DYN&#8217; slot in the status bar, or in the drafting options.<br />
Alternatively, change the dynamic input options for coordinates: in AutoCAD LT 2007, this is in<br />
Tools | Drafting Settings | Dynamic Input | Pointer Input Settings | Format: Absolute coordinates.</p>
<p>Whoosh!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/soundripple.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/soundripple.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/soundripple.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/soundripple.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/soundripple.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/soundripple.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/soundripple.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/soundripple.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/soundripple.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/soundripple.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/soundripple.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/soundripple.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/soundripple.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/soundripple.wordpress.com/107/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=soundripple.com&amp;blog=6360666&amp;post=107&amp;subd=soundripple&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://soundripple.com/2009/06/23/moving-to-origin-in-autocad/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fe7f2c030846844c6ffd78c8dc099f7e?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif&#38;r=PG" medium="image">
			<media:title type="html">soundripple</media:title>
		</media:content>
	</item>
		<item>
		<title>Reading SQL Server&#8217;s IMAGE Data Type</title>
		<link>http://soundripple.com/2009/06/16/reading-sql-servers-image-data-type/</link>
		<comments>http://soundripple.com/2009/06/16/reading-sql-servers-image-data-type/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 20:22:44 +0000</pubDate>
		<dc:creator>soundripple</dc:creator>
				<category><![CDATA[sql server]]></category>

		<guid isPermaLink="false">http://soundripple.com/?p=104</guid>
		<description><![CDATA[For the &#8220;something I always forget and have to search for&#8221; bucket: if you have an IMAGE data type in a table, and you want a quick-n-nasty way to read the contents, AND if it&#8217;s not more than 8000 characters: Told you it was quick, and told you it was nasty<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=soundripple.com&amp;blog=6360666&amp;post=104&amp;subd=soundripple&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>For the &#8220;something I always forget and have to search for&#8221; bucket: if you have an IMAGE data type in a table, and you want a quick-n-nasty way to read the contents, AND if it&#8217;s not more than 8000 characters:</p>
<p><pre class="brush: sql;">
select cast(cast(fieldName as varbinary(8000)) as varchar(8000))
FROM tablename
</pre></p>
<p>Told you it was quick, and told you it was nasty <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/soundripple.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/soundripple.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/soundripple.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/soundripple.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/soundripple.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/soundripple.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/soundripple.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/soundripple.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/soundripple.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/soundripple.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/soundripple.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/soundripple.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/soundripple.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/soundripple.wordpress.com/104/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=soundripple.com&amp;blog=6360666&amp;post=104&amp;subd=soundripple&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://soundripple.com/2009/06/16/reading-sql-servers-image-data-type/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fe7f2c030846844c6ffd78c8dc099f7e?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif&#38;r=PG" medium="image">
			<media:title type="html">soundripple</media:title>
		</media:content>
	</item>
		<item>
		<title>Liz&#8217;s Birthday: Triathlon Cake</title>
		<link>http://soundripple.com/2009/05/24/lizs-birthday-triathlon-cake/</link>
		<comments>http://soundripple.com/2009/05/24/lizs-birthday-triathlon-cake/#comments</comments>
		<pubDate>Sun, 24 May 2009 19:00:27 +0000</pubDate>
		<dc:creator>soundripple</dc:creator>
				<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://soundripple.com/?p=94</guid>
		<description><![CDATA[Liz&#8217;s birthday was this week, and she said she wanted the chocolate cake from the Joy of Vegan Baking.  It&#8217;s amazingly easy to make, we&#8217;ve used it for a few occasions, and always comes out really well. I really wanted to decorate it in a way that means something to her, and at the same [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=soundripple.com&amp;blog=6360666&amp;post=94&amp;subd=soundripple&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Liz&#8217;s birthday was this week, and she said she wanted the chocolate cake from the <em>Joy of Vegan Baking</em>.  It&#8217;s amazingly easy to make, we&#8217;ve used it for a few occasions, and always comes out really well.</p>
<p>I really wanted to decorate it in a way that means something to her, and at the same time was worried, because I don&#8217;t have much of a steady hand when it comes to icing a cake.  A quick Google image search for &#8216;bicycle cake&#8217; confirmed my fears &#8211; unless you&#8217;re a pastry chef, there&#8217;s precious little chance of making something that looks like a bike!</p>
<p>I had been thinking about other ways of decorating it, and then Liz&#8217;s coworker made her a beautiful <a href="http://www.flickr.com/photos/speedvegan/3550832079/">fondant covered cake</a>, which got me to thinking that maybe I could use fondant to achieve what I wanted, since it would let me cut stuff and arrange it before I put it on the cake (the finality of icing bags makes me nervous!  One twitch, and your cake changes from a picture of a bike into something postmodern and vaguely frightening).  A bit of looking around confirmed that you either make fondant from gelatin and sugar, or cooked marshmallows (aka, gelatin and sugar).  There are some vegan recipes out there, but they all looked either tricky or unreliable, and I didn&#8217;t find many people saying that fondant was actually delicious regardless of how you make it.</p>
<p>So, the logical conclusion was marzipan, which has always seemed entirely delicious to me, and is something that I know Liz likes.  Luckily, based on the numbers coming to the party, we needed three cakes (I can&#8217;t imagine the cosmic connection between the number of people at a party and the number of events in a triathlon, but I&#8217;m sure it&#8217;s there!).  And, not only that  &#8211; I had a mix of cake pan sizes (two eight-inch, one nine-inch) , and Liz&#8217;s favourite thing ever is the bike event, which falls in the middle of the famous &#8216;swim, bike, run&#8217;, so that got the larger cake and saved the symmetry.</p>
<p><a title="The Cake by cloudmonkey, on Flickr" href="http://www.flickr.com/photos/cloudmonkey/3560420914/"><img src="http://farm4.static.flickr.com/3604/3560420914_bb4d14e32f.jpg" alt="The Cake" width="490px" style="border:1px solid gray;padding:3px;" /></a></p>
<p>Anyway, the result came out just how I wanted it &#8211; and Liz seemed happy too, which is of course the whole point.  Happy birthday baby!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/soundripple.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/soundripple.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/soundripple.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/soundripple.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/soundripple.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/soundripple.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/soundripple.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/soundripple.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/soundripple.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/soundripple.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/soundripple.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/soundripple.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/soundripple.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/soundripple.wordpress.com/94/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=soundripple.com&amp;blog=6360666&amp;post=94&amp;subd=soundripple&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://soundripple.com/2009/05/24/lizs-birthday-triathlon-cake/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fe7f2c030846844c6ffd78c8dc099f7e?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif&#38;r=PG" medium="image">
			<media:title type="html">soundripple</media:title>
		</media:content>

		<media:content url="http://farm4.static.flickr.com/3604/3560420914_bb4d14e32f.jpg" medium="image">
			<media:title type="html">The Cake</media:title>
		</media:content>
	</item>
		<item>
		<title>Scroll-Lock on the XPS M1340</title>
		<link>http://soundripple.com/2009/05/20/scroll-lock-on-the-xps-m1340/</link>
		<comments>http://soundripple.com/2009/05/20/scroll-lock-on-the-xps-m1340/#comments</comments>
		<pubDate>Wed, 20 May 2009 21:59:03 +0000</pubDate>
		<dc:creator>soundripple</dc:creator>
				<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://soundripple.com/?p=91</guid>
		<description><![CDATA[Looking for the archaic old scroll-lock on the Studio XPS 13?  It&#8217;s not labeled on the keyboard, but you can use Fn-F5. I use it as an Outlook macro &#8216;modifier&#8217;; I use a macro to delay all my messages by two minutes, unless the scroll-lock is on when I send the message (at which point [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=soundripple.com&amp;blog=6360666&amp;post=91&amp;subd=soundripple&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Looking for the archaic old scroll-lock on the Studio XPS 13?  It&#8217;s not labeled on the keyboard, but you can use <strong>Fn-F5</strong>.</p>
<p>I use it as an Outlook macro &#8216;modifier&#8217;; I use a macro to delay all my messages by two minutes, unless the scroll-lock is on when I send the message (at which point I allow the message to be sent immediately, and turn off the scroll-lock).</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/soundripple.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/soundripple.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/soundripple.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/soundripple.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/soundripple.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/soundripple.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/soundripple.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/soundripple.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/soundripple.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/soundripple.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/soundripple.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/soundripple.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/soundripple.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/soundripple.wordpress.com/91/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=soundripple.com&amp;blog=6360666&amp;post=91&amp;subd=soundripple&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://soundripple.com/2009/05/20/scroll-lock-on-the-xps-m1340/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fe7f2c030846844c6ffd78c8dc099f7e?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif&#38;r=PG" medium="image">
			<media:title type="html">soundripple</media:title>
		</media:content>
	</item>
	</channel>
</rss>
