Extract TreeView or ListView ImageList icons from a DLL

An ImageList can be used for a ListView or TreeView control to contain many images in a single file, usually embedded as a resource.  Visual Studio itself has many icons.   If you open Windows Explorer or Internet Explorer, you can see many icons in toolbars, ListViews or TreeViews.     Using Visual Studio (any…

8

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…

2

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….

9

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,…

3

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…

13

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…

6

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…

2

Customize your Windows Mobile SmartPhone home screen and Start Menu

My Smartphone (Cingular 2125) died the other day: actually the phone was fine: the SIM card needed replacing. In the old days, if your phone died you could get help 24 hours a day. Nowadays you have to wait til their service center is open. On the trusty landline phone, they told me to swap…

8

Run your application forms on the web

I received a customer question:   I have looked all over the web and still searching, and found your blog. I have a very specific issue and I need to ask whether this is doable first of all and how to do it after.   First of all, I need to make a foxPro app…

8

How to generate dynamic images for your web application

Typically, a web site might show some pictures. These could be pictures of items for sale from a catalog, personal photos, etc. Usually, the web author places these pictures as files in a directory on the web server, and just puts links to them in the authored web pages.   This scheme doesn’t easily allow…

2