Create a WPF Form to choose a text color

I wanted to choose some nice colors for various kinds of text, so I wrote a simple text color picker using Windows Presentation Foundation (WPF).   The code creates a TextBlock and 4 slider controls: one for Alpha channel (Opacity) and one each for Red, Green and Blue.   The code shows how to add…


Resize your pictures for your phone or pocket pc

I have many digital pictures, and I’d like to put some of my favorites on my SmartPhone. However the files are much higher resolution than the device’s display. This means the files take a lot more memory on the phone, and they take longer to process. I wrote some code to resize the images automatically….


Generate and run PowerShell scripts dynamically

In my prior post Use new XML Features of VB to generate dynamic scripts and text files , we generated a simple batch file. It’s difficult to modify the registry or manipulate a COM object   PowerShell scripts allow you to manipulate files, registry and COM objects, using a uniform object manipulation metaphor. For example,…


Use new XML Features of VB to generate dynamic scripts and text files

There’s a very useful feature that FoxPro users have had for over 2 decades: being able to output text in any format, with WYSIWYG and the ability to embed expressions (The TEXT…ENDTEXT command)   Generating XML, HTML, Bat files, PowerShell Script, etc is a breeze with this command. Free form text between the “TEXT” and…


Customize the display of types in the Debugger using Extension Methods and DebuggerDisplay Attribute

I was writing some code using System.Text.StringBuilder. :           Dim sb As New StringBuilder(“Init SB String”)   At a breakpoint the debugger Locals Window shows   +                      sb        {System.Text.StringBuilder}        System.Text.StringBuilder   If I expand by clicking on the “+”, I get:   –                       sb        {System.Text.StringBuilder}        System.Text.StringBuilder                         Capacity           32         Integer                         Chars    In order…


Create your own web browser on your SmartPhone

Windows Mobile 5.0 comes with a Web Browser (v6 is due out any day now).  It runs on Pocket PCs and SmartPhones. That browser only allows one web page to show at a time: to show another page, you have to navigate away from the current page. I created a web browser for my first…