March 18, 2000

GetShortenedFileName – Make a filename shorter using ellipses

‘ return a file path not longer than the number of character’ specified in the 2nd argument” If necessary, it replaces directory names with ellipsises” Author: Fred Block’ CuzWare Systems’ E-mail: [email protected]’ Web Site: http://www.cuzware.comFunction GetShortenedFileName(ByVal strFilePath As String, _ ByVal maxLength As Long) As String Dim astrTemp() As String

Rotator – A class for printing rotated text to screen or the printer

‘ —————————————-‘ The Rotator class module” A class for printing rotated text to a ‘ Form, PictureBox or the Printer” Author: Timm Dickel ([email protected])” —————————————-‘ Usage:’ Dim rotTest As New Rotator’ Set rotTest.Device = Printer’ ‘ set all font attributes as required, e.g.’ Printer.Font.Size = 12 ‘ ‘Label strings at

VBSendKeys – Send keys to any Windows and MS-DOS application

Private Declare Function OemKeyScan Lib “user32” (ByVal wOemChar As Integer) As _ LongPrivate Declare Function CharToOem Lib “user32” Alias “CharToOemA” (ByVal _ lpszSrc As String, ByVal lpszDst As String) As LongPrivate Declare Function VkKeyScan Lib “user32” Alias “VkKeyScanA” (ByVal cChar _ As Byte) As IntegerPrivate Declare Function MapVirtualKey Lib “user32”

ReplaceWordEx – Replace whole words, with your choice of delimiters

Option Explicit’————————————————————————‘ This enum is used by both InstrWordEx and ReplaceWordEx” It uses a binary value to determine what separator characters are allowed’ bit 0 = allow spaces’ bit 1 = allow symbols’ bit 2 = allow control chars’ bit 3 = allow digits’ If all are excluded (ie a

WindowsVersionSP – Determine Windows version and NT service pack info

Private Type OSVERSIONINFO dwOSVersionInfoSize As Long dwMajorVersion As Long dwMinorVersion As Long dwBuildNumber As Long dwPlatformId As Long szCSDVersion As String * 128End TypePrivate Declare Function GetVersionEx Lib “kernel32” Alias “GetVersionExA” _ (lpVersionInformation As OSVERSIONINFO) As Long’ Returns Version of Windows as a String’ NOTE: Win95 returns “4.00”, WIn98 returns

InstrWordEx – Find a whole word, with your choice of delimiters

‘————————————————————————‘ This enum is used by both InstrWordEx and ReplaceWordEx” It uses a binary value to determine what separator characters are allowed’ bit 0 = allow spaces’ bit 1 = allow symbols’ bit 2 = allow control chars’ bit 3 = allow digits’ If all are excluded (ie a value

Use the MapPath() Method Instead of Hard Coding Paths

You should prefer to use the MapPath() method of the Server object instead of hard coding the complete literal paths in ASP applications. The MapPath() method allows you to physically relocate an ASP application without recoding your scripts. This technique saves you the effort of having to modify and maintain