« January 2007 | Main | March 2007 »

February 25, 2007

Giant snow drift …

We were supposedly going to receive a dumping of snow last night – 5 to 16 inches. I don't believe we got anywhere near that actually, as the moisture was mainly in the form of sleet or rain. The wind however, was wicked. It creates some interesting wind patterns around our house, including a cool vortex like pattern at the back in a corner of our house (a picture wouldn't have done it justice). The wind did manage to carry a LOT of snow to the front of our garage doors and front stoop.

At the tallest point, the snow had drifted about 4 feet. What was funny in a way was that parts of our driveway and sidewalk had ZERO snow. It had been blown completely dry (and piled it all nicely in a single spot).

It took us (me and my wife) about an hour to clear a path in front of two garage doors and a narrow walkway to the front porch with two shovels (we don't own a snowblower).

February 22, 2007

Classic on-line shopping Experience at Gateway

My father is looking for a laptop, so I thought I'd check out what Gateway had to offer online.

I was on the last page of "please please buy some accessories" in the "Additional Software section":

 

OK. No, he doesn't need anything from Google, Napster, a pointless thank you, or the America Online Client Application.

I unchecked them all.

Click buy to see the final total and summary so I can send it to him….

ERROR!

I'm sorry, we don't really want those to be an option stupid user. Not only did you screw up big time user (that would be me L), I'm going to give you some helpful error codes you can refer to later. CRC05928E is one of my absolute favorites – I must have a "Thank You part."

Hello? Earth to web designers and application designers. Don't give me phantom options. If an option really isn't an option, why put a checkbox and better yet, a Quantity?

For extra fun, why not select 6 Google toolbars? More the merrier!

Hmm. It appears I can't get 6 as that exceeds my maximum.

OK, carefully now. Seven or less. Break out calc.exe.

That would be 3 of the Google toolbar and 1 of each of the others. OK. Qty = 3.

Duh.

February 20, 2007

My favorite feature in Adobe Reader

I gave the only reasonable Windows-based alternative to Adobe Reader 2 weeks on my machine – and my wife's machine: Fox It Reader.

Two weeks later, after crashing about 20% of the time using the software, I uninstalled it.

Adobe Reader 8 was installed in its place. I just thought I'd share the feature I always deactivate in every version of Reader that had this feature:

Display PDF In Browser

 

One time-tested technique for hanging both Firefox and IE is to open PDF files in either web-browser. With this option turned off, you can often save yourself the headache of a tabbed browser hanging as Adobe Reader chokes. I've heard decent things about version 8, so I'm hoping things are better, but I'm a skeptical customer when it comes to anything "Adobe Reader." I still am amazed that Fox It Reader, while not a 100% full featured PDF reader, weighs in at a measly 1.66 MB, while the Adobe Reader 8 behemoth breaks the scale at a whopping 20MB!

In any case, if you choose to use Adobe Reader, try that option. It will save you some pain when it hangs (this way you can nuke only the Adobe process rather than your browser!).

VirtualPC 2007 Released – Free!

Microsoft just released Virtual PC 2007 32 & 64 bit. Download is available here. It's still free. It runs on Vista. It runs Vista (without Aero glass of course). No complaints from me given the price. It's outpaced by rival VMware, but most will only need the functionality provided by Virtual PC 2007.

February 18, 2007

Wildlife in our front yard

We spotted three of these in a tree outside of our rural house this afternoon:

Barred Owl, Strix varia

Facts:

20-24" (50-60cm)

It's a common owl that can be seen hunting during the day. [check!]

Prefers dense woodlands with sparse undergrowth [check, nearby]

Sounds like a dog barking before it gives an eight-hoot call sounding like "who-cooks-for-you? Who-cooks-for-you?" [the windows were closed and they didn't appear to be hooting]

 

 

February 17, 2007

Stupid Office 2007 Tricks

Good golly. If my blog posts don't look snazzier when using Office 2007, I must be doing something wrong:

I can apply all of the new image formats to pictures:

(Who said it had to be a real photo though – Visual Studio looks really cool that way.)

I can insert attractive SmartArt:

I can use clip art likely included in Word 1.0 (!!!):

 

 

I can make graphs I don't understand:

I can format beautiful tables:

 

Series 1

Series 2

Series 3

Category 1

4.3

2.4

2

Category 2

2.5

4.4

2

Category 3

3.5

1.8

3

Category 4

4.5

2.8

5

 

And I can even use WordArt!

OK, so this was a pointless post … but be ready for some cool graphs, awesome charts, and maybe even some word art…!

(OK, no WordArt. I only found WordArt useful for creating snazzy PowerPoint titles without resorting to Adobe Illustrator).

Running Visual Studio 2005 as Administrator on Vista

I'm still peeved that I need to run Visual Studio 2005 as an Administrator on Vista. Even more annoying is the UAC dialog that I need to see every time I launch it.

One simple shortcut for making it easier to run it as an administrator every time you launch it (so you can stop with the "right-click", "Run as Administrator" option) is to force Windows to launch it always as an Administrative application. It doesn't make the UAC dialog go away, but at least I'm less likely to launch it incorrectly this way (and maybe you'll be too!).

Here's how – it's very simple:

Find the option in your start menu either via search or navigation:

Right click and select Properties:

 

Click the "Advanced…" button to see the Advanced Properties window:

Then check the "Run as administrator" option.

Of course, this same technique works for any application that you must run as an Administrative user.

Office 2007 Color schemes

If you're running Office 2007, you have an option to switch from the default "blue" theme to one of several other options.

Here's how to switch the color scheme (theme) in Office 2007:

  • One quick way to get to the options is to right click on the tab area at the top of any of the new "ribbon" applications such as Word 2007 or Excel 2007 (not Outlook):

  • Select "Customize Quick Access Toolbar…"
  • Then, select "Popular" from the list of options on the left.
  • Midway down the list of popular options is the "Color scheme" option:

 

There are only three options: blue, silver, and black. Too bad it can't pick up on the color selected in Vista. L

Blue (default):

Silver:

Black:

 

The color does apply to Outlook as well, although it doesn't look as nice (the sections float a bit):

A few handy WPF Visual Studio 2005 Snippets

Here are a handful of simple snippets I've made to some existing WPF snippets that I find useful when coding .NET 3.0.

Paste them into a file with the extension

.snippet
and place them in the following directory:

…your account…\Documents\Visual Studio 2005\Code Snippets\Visual C#\My Code Snippets

 

Restart Visual Studio 2005 and the new snippets should be available.

The snippets included are:

Name

Description

propdpc

Create a new dependency property, using FrameworkPropertyMetadata, which is normally more useful than PropertyMetadata, and also an event to handle when the property changes (for those occasions when the Options flags don't suffice).

propdpf

Same as above, although without the event.

Rpnc

Code for "RaisePropertyNotifyChanged". If you implement INotifyPropertyChanged and like to encapsulate the call to the event, this is the function you'll often want.

Propr

A standard .NET backed property, but calls the function defined in the previous snippet.

 

<?xml version="1.0" encoding="utf-8" ?>

<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">

    <CodeSnippet Format="1.0.0">

        <Header>

            <Title>Define a DependencyProperty</Title>

            <Shortcut>propdpc</Shortcut>

            <Description>Dependency property, using frameworkPropertyMetadata, with PropertyChanged event</Description>

            <SnippetTypes>

                <SnippetType>Expansion</SnippetType>

            </SnippetTypes>

        </Header>

        <Snippet>

            <Declarations>

                <Literal>

                    <ID>type</ID>

                    <ToolTip>Property Type</ToolTip>

                    <Default>int</Default>

                </Literal>

                <Literal>

                    <ID>property</ID>

                    <ToolTip>Property Name</ToolTip>

                    <Default>MyProperty</Default>

                </Literal>

                <Literal>

                    <ID>ownerclass</ID>

                    <ToolTip>The owning class of this Property. Typically the class that it is declared in.</ToolTip>

                    <Default>ownerclass</Default>

                </Literal>

                <Literal>

                    <ID>defaultvalue</ID>

                    <ToolTip>The default value for this property.</ToolTip>

                    <Default>0</Default>

                </Literal>

                <Literal>

                    <ID>frameworkoptions</ID>

                    <ToolTip>The options for this property and how it affects the DP</ToolTip>

                    <Default>.None</Default>

                </Literal>

            </Declarations>

            <Code Language="csharp">

                <![CDATA[public $type$ $property$

{

get { return ($type$)GetValue($property$Property); }

set { SetValue($property$Property, value); }

}

 

public static readonly DependencyProperty $property$Property =

DependencyProperty.Register("$property$", typeof($type$), typeof($ownerclass$),

new FrameworkPropertyMetadata($defaultvalue$,

FrameworkPropertyMetadataOptions$frameworkoptions$,

new PropertyChangedCallback($property$PropertyChanged)));

 

private static void $property$PropertyChanged(DependencyObject depObj, DependencyPropertyChangedEventArgs e)

{

// put code here to handle the property changed for $property$

$ownerclass$ $ownerclass$Obj = depObj as $ownerclass$;

if ($ownerclass$Obj != null)

{

 

}

}

 

$end$]]>

            </Code>

        </Snippet>

    </CodeSnippet>

    <CodeSnippet Format="1.0.0">

        <Header>

            <Title>Define a DependencyProperty</Title>

            <Shortcut>propdpf</Shortcut>

            <Description>DependencyProperty, using FrameworkPropertyMetadata, no change notification</Description>

            <SnippetTypes>

                <SnippetType>Expansion</SnippetType>

            </SnippetTypes>

        </Header>

        <Snippet>

            <Declarations>

                <Literal>

                    <ID>type</ID>

                    <ToolTip>Property Type</ToolTip>

                    <Default>int</Default>

                </Literal>

                <Literal>

                    <ID>property</ID>

                    <ToolTip>Property Name</ToolTip>

                    <Default>NameTheProperty</Default>

                </Literal>

                <Literal>

                    <ID>ownerclass</ID>

                    <ToolTip>The owning class of this Property. Typically the class that it is declared in.</ToolTip>

                    <Default>OwnerClassType</Default>

                </Literal>

                <Literal>

                    <ID>defaultvalue</ID>

                    <ToolTip>The default value for this property.</ToolTip>

                    <Default>0</Default>

                </Literal>

                <Literal>

                    <ID>frameworkoptions</ID>

                    <ToolTip>The options for this property and how it affects the DP</ToolTip>

                    <Default>.None</Default>

                </Literal>

            </Declarations>

            <Code Language="csharp">

                <![CDATA[public $type$ $property$

{

get { return ($type$)GetValue($property$Property); }

set { SetValue($property$Property, value); }

}

 

public static readonly DependencyProperty $property$Property =

DependencyProperty.Register("$property$", typeof($type$), typeof($ownerclass$),

new FrameworkPropertyMetadata($defaultvalue$,

FrameworkPropertyMetadataOptions$frameworkoptions$));

 

$end$]]>

            </Code>

        </Snippet>

    </CodeSnippet>

    <CodeSnippet Format="1.0.0">

        <Header>

            <Title>rpnc</Title>

            <Shortcut>rpnc</Shortcut>

            <Description>Code snippet for a RaisePropertyChanged method (used by propr)</Description>

            <Author></Author>

        </Header>

        <Snippet>

            <Code Language="csharp">

                <![CDATA[protected void RaisePropertyChanged(string propertyName)

{

System.Diagnostics.Debug.Assert(!string.IsNullOrEmpty(propertyName));

 

if (PropertyChanged != null)

{

PropertyChanged(this, new PropertyChangedEventArgs(propertyName));

}

}

$end$]]>

            </Code>

        </Snippet>

    </CodeSnippet>

    <CodeSnippet Format="1.0.0">

        <Header>

            <Title>propr</Title>

            <Shortcut>propr</Shortcut>

            <Description>Code snippet for property and backing field with Notification via RaisePropertyChanged method</Description>

            <Author></Author>

            <SnippetTypes>

                <SnippetType>Expansion</SnippetType>

            </SnippetTypes>

        </Header>

        <Snippet>

            <Declarations>

                <Literal>

                    <ID>type</ID>

                    <ToolTip>Property type</ToolTip>

                    <Default>int</Default>

                </Literal>

                <Literal>

                    <ID>property</ID>

                    <ToolTip>Property name</ToolTip>

                    <Default>MyProperty</Default>

                </Literal>

                <Literal>

                    <ID>field</ID>

                    <ToolTip>The variable backing this property</ToolTip>

                    <Default>myVar</Default>

                </Literal>

            </Declarations>

            <Code Language="csharp">

                <![CDATA[private $type$ $field$;

 

public $type$ $property$

{

get { return $field$;}

set

{

if ($field$ != value)

{

$field$ = value;

RaisePropertyChanged("$property$");

}

}

}

$end$]]>

            </Code>

        </Snippet>

    </CodeSnippet>

</CodeSnippets>

 

 

Light on the blog posts …

I've been a little lax on posting recently. I was building some interesting posts, and simply got lazy and didn't post. I installed Vista last week and it's taken me a while to get things back together, including blogging tools. I'm trying Word 2007 though right now. It's not a super blog posting tool, but it's handy and familiar (in that completely new interface sort of way—most things are disabled though for blogging). It has the basic features I like so I'll use it for a while.

I'm hoping that I can post code snippets more easily than I could with the crap-tastic RocketPost. So, I'll try to post a bit more regularly – especially some WPF/XAML stuff that I've found very interesting recently. Until someone offers to pay me for this, I can't promise anything…

I don't want this to become a link blog either so I hope that the stuff I provide is interesting on its own and maybe link worthy from other sites…. J

Zip Format Support In Vista

Oh – I certainly hope this isn't accurate:

5 Days and 17 hours to unzip a file?

At one point it said 16 days. J Thankfully that wasn't 11 days ago. I'm happy that Vista offers large zip file support -- just wish the estimates were a bit more precise (or don't bother with them).

Help support my web site by searching and buying through Amazon.com (in assocation with Amazon.com).