Technology All The Way

January 2006

File Renaming

By tmichael on January 16, 2006 5:50 PM

If you ever need to rename a large number of files, for instance you have finally decided to organize your digital photos, check out Bulk Rename Utility - Downloads.

This program seems complex at first, but that is simply because it can do almost any sort of bulk renaming you can imagine. As a computer geek, I know I could write this program. Lucky for me, I don't have to as it has already been written.

June 2005

Network Mapping made easy

By tmichael on June 5, 2005 1:54 AM

While trying to map my local network, I was pointed to this program:

Network management, network discovery, SNMP, MIB and WMI browsers, NetBIOS and port scanner

Seems to work very well and the price is very right.

February 2005

Webcam Software

By tmichael on February 23, 2005 11:18 AM

I like the looks of this program: TinCam WebCam Software

I guess I will have to try it out.

January 2004

Recording LP Albums

By tmichael on January 28, 2004 9:26 AM

The Recording LP Albums On Your Computer - Tutorials might be very useful if I ever get around to helping my father convert his many LPs to digital recordings.

October 2003

CDOSYS.dll missing

By tmichael on October 21, 2003 4:01 PM | 1 Comment

As I worked to convert the c# info in my post about saving a web page as an mht file, I ran into a problem with the reference to cdosys.dll.

A little research brought me to this page:

318823 - CDO for Windows 2000 Library Reference Is Unavailable in Visual Basic Project

There I learned:

If you try to create or modify a project that references the Microsoft Collaboration Data Objects for Windows 2000 (CDOSYS) Library, the reference is not available. The reference for the Microsoft Collaboration Data Objects (CDO) for Exchange 2000 Library is present instead.

So the quest continues.

Saveas MTH file

By tmichael on October 21, 2003 3:44 PM | 3 Comments

I want to download and programatically save web pages as mht files. I was having a hard time until I went to IE SaveAS MHTML in C#, where I found the following code:

Make a reference to these two COM objects:

C:\Program Files\Common Files\System\ado\msado15.dll
I don't think neither of these have PIAs (Primary Interop Assembly) so this will generate two typelibs for your project.

The Source:

CDO.MessageClass message = new CDO.MessageClass();
message.CreateMHTMLBody("", CDO.CdoMHTMLFlags.cdoSuppressNone, "", "");
ADODB.Stream stream = message.GetStream();
stream.SaveToFile("fanms.mht", ADODB.SaveOptionsEnum.adSaveCreateOverWrite);

Now I just have to change it to VB.

Update: Here is my version of this code in VB:

Dim message As New CDO.MessageClass()
message.CreateMHTMLBody("", CDO.CdoMHTMLFlags.cdoSuppressNone, "", "")
Dim Outstream As ADODB.Stream
Outstream = message.GetStream
Outstream.SaveToFile("c:\test.mht", ADODB.SaveOptionsEnum.adSaveCreateOverWrite)

August 2003

Very Useful Moveable Type Plug-in

By tmichael on August 23, 2003 10:59 PM

I used the plugin that I found at Movable Type Plugins: Supplemental Calendar Tags plugin documentation to add a 3 month calendar to my index page.

June 2003

TreeNode Level

By tmichael on June 22, 2003 4:55 PM

If you spend any time working with Treeviews, I can't imagine not needing this or having to invent it yourself:

Windows Forms FAQ - Windows Forms TreeView

Public Sub NodateLevel(ByVal node as TreeNode) As Integer
Dim level as Integer = 0
While Not node Is Nothing
node = node.Parent
level = level 1
End While
End Sub

I edited into this:

Private Function NodeLevel(ByVal node As TreeNode) As Integer
Dim level As Integer = 0
While Not node Is Nothing
node = node.Parent
level = level + 1
End While
End Function

Hide Datagrid Expanders

By tmichael on June 21, 2003 6:12 PM | 1 Comment

In the program I am developing, I wanted to show data from a table in a datagrid. This table is related to another table. As a result, this datagrid would show an expander and the name of that other table. I wanted this hidden. So I asked myself, "How do I hide the expander?" I didn't know so I searched and found the following:

Microsoft Support WebCasts

One DataGrid is designated to be the master grid and the second is designated to be the details grid. When you select an entry in the master list, all of the related child entries are shown in the details list. As you can see, there are no expanders shown on the master DataGrid. This is done by setting the AllowNavigation property of the DataGrid controls to false.

So there you have it set AllowNavigation to False. If you happen to find this useful, please link to this post as there is nothing that says to do this to hide them. I think this would be very helpful to others.

Version Number

By tmichael on June 9, 2003 3:29 PM

I used information from Versioning an Assembly to be able to control the version numbers of my current project.


imports system
imports system.reflection
Imports System.Runtime.InteropServices
<Assembly: AssemblyTitle("")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("")>
<Assembly: AssemblyProduct("")>
<Assembly: AssemblyCopyright("")>
<Assembly: AssemblyTrademark("")>
<Assembly: CLSCompliant(True)>
'The following GUID is for the ID of the typelib if this project is exposed to COM
<Assembly: Guid("41BD3203-06FC-4FF4-8A74-3C842C207D49")>
' Version information for an assembly consists of the following four values:
' Major Version
' Minor Version
' Build Number
' Revision
' You can specify all the values or you can default the Build and Revision Numbers
' by using the '*' as shown below:
<Assembly: AssemblyVersion("")>

Manipulating Word and Its SpellChecker pt. 1

By tmichael on June 7, 2003 10:30 AM

In an effort to reuse the Spellchecker of MS Word, I have learned how to get it to check the spelling of a word or words. I have even learned how to get it to generate suggestions. I have, however been unable to convince it to reload the custom dictionaries after I have added a word to one of them. This is very frustrating because it makes me unable to have an effective form that works like the spell-checking dialog box in Word.

Having spent more time on this issue than I would like I decided why recreate something like the Word spell checker when it is just as available directly. Thus I thought I had solved my problem. I simply programatically paste the word or words I want to check into a blank Word Doc and then run the spell checker and then retrieve the corrections from Word for my application.

Alas I have found this simple plan to have one flaw. If my application is higher than Word in the Z-order, then the spell-check dialog box is placed behind my application. So I thought, this shouldn't be hard to fix, just raise the place of Word in the z-order.

Does .net have a way to do this?

Of course not (at least as far as my research has found), but there is a way to do it in older versions of VB. That method is to manipulate the Window via the Windows API. Technically this is still possible via .Net as well so I have decided to do it this way.

Enough background. What is this entry about? To manipulate a window via the API you need it handle. Thus the link:

302281 - HOWTO: Obtain the Window Handle for an Office Automation Server Using Visual Basic .NET

Here is the most relevant part:

Imports System.Runtime.InteropServices
Imports Microsoft.Office.Interop
Public Class MyApi
<DllImport("user32.dll")> Public Shared Function _
FindWindow(ByVal strClassName As String, ByVal strWindowName _
As String) As Integer
End Function
End Class
Dim xlapp As Excel.Application
Dim hwndExcel As Integer
xlapp = New Excel.Application()
xlapp.Visible = True
xlapp.Caption = "Some Window Caption"
hwndExcel = MyApi.FindWindow("XLMAIN", xlapp.Caption)
xlapp.Caption = Nothing
MsgBox("hwndExcel (" & Hex(hwndExcel) & ") has the Window handle to " & _
"Excel's Main Window." & vbCr & " Click OK to close Excel." )

Now I just have to adapt it to Word.

Good Reference

By tmichael on June 7, 2003 11:30 AM

kbAlertz! is a page that lists most (all?) of the Microsoft Knowledge Base articles, relevant to Visual Studio .Net. It can be very helpful in identifying what MS has to say about an issue.

Method to cause an application to show a dialog box

By tmichael on June 7, 2003 2:18 PM

Show Method

Here is how I used it:

x = WordApp.Dialogs.Item(WdWordDialog.wdDialogToolsSpellingAndGrammar).Show

Word's Classname

By tmichael on June 7, 2003 2:20 PM

Particle Software :: Recall Application

Manipulating Word and Its SpellChecker pt. 1

By tmichael on June 7, 2003 2:33 PM

Now that I have the handle for Word I need to make use of the Topmost function to raise it above the others. I found this page to be helpful:

VB TopMost Function

The most useful parts are:

Public Const HWND_TOPMOST = -1
Public Const HWND_NOTOPMOST = -2
Public Const SWP_NOMOVE = &H2;
Public Const SWP_NOSIZE = &H1;
Public Const SWP_NOACTIVATE = &H10;
Public Const SWP_SHOWWINDOW = &H40;
Public Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, y, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Public Sub MakeTopMost(Handle As Long)
SetWindowPos Handle, HWND_TOPMOST, 0, 0, 0, 0, TOPMOST_FLAGS
End Sub
Public Sub MakeNormal(Handle As Long)
SetWindowPos Handle, HWND_NOTOPMOST, 0, 0, 0, 0, TOPMOST_FLAGS
End Sub

Bringing a specific window to the top yet again

By tmichael on June 7, 2003 5:49 PM

I was still having problems so I found this page:

Create a Form that Cannot Be Activated

From It I found this that seems to work better:

Private Declare Function BringWindowToTop _
Lib "user32" (ByVal hwnd As Long) As Long

Long List of How To's

By tmichael on June 7, 2003 6:04 PM

I stumbled across this list. I think it may be very helpful in the future:

Microsoft QuickStart Tutorials

June 2001

Image comparison program

By tmichael on June 20, 2001 4:24 PM

his program would devise some method of generating a reasonably unique fingerprint of a given image and then with a comparison of either new or existing fingerprints be able to identify likely duplicates. These duplicates could then deleted after visual inspection. For reasonably large collection of digital images, my target would be no more than 5% of all duplicates identified would be false matches. After the elimination of the duplicates, I would like for it to create a database of all images, their locations, characteristics and provide a way of classifying the content.

There are several free and commercial programs that do much of the image comparisons. I may end up utilizing one that does this with an Access database and then adding the remaining capability to the database.

Basic Web Crawler

By tmichael on June 20, 2001 4:21 PM

This would be a web crawler that would be able to gather information in an automated fashion and enter this information into a database for other uses. While I have a few ideas for uses of this information, I do not yet want to describe those plans fully.

Information gathered would include total display characters, dimensions of images displayed, quantity of images, links contained on the page and whether those links are within the site or to external destinations.

I envision that the process would be recursive and controllable in how many links deep the crawler would go, whether to go outside the initial target site and whether to gather the information in concentric rings or whether it will follow each branch of the tree.

Email proxy

By tmichael on June 20, 2001 3:41 PM

This program would reside on a windows computer and would pass-thru POP3 email connections. It would add value by acting as an email filter. I intend to add the capability to scan incoming and outgoing messages. All incoming messages would be scanned for certain criteria and according to the rules contained in an interior database do one of 3 actions:

  1. Delete the message so that the email client never sees it.
  2. Passes the email through untouched.
  3. Passes the email through after adding specific information either into the email headers or into the body itself.

The database of rules and associated actions would be populated by the examination of outgoing email. These email would be scanned for certain keywords. These keywords would indicate that the email should be handled by the proxy program. Without a keyword the email would be passed through to the outgoing server.

With a keyword, the proxy server would parse the email to determine what sort of new rule and action should be added to the database.

I foresee that when combined with a email hosting service with a dedicated domain name that this program would also be able to generate one-time email address for use in various website registrations. I want to do this to be able to track who is selling my email address to spammers and also to be able to rapidly abandon an email address.