Bulgarian   Chinese - Simplified   Chinese - Traditional   Dutch   English - United States   French   German   Portuguese - Iberian   Spanish   Swedish   Tamil   Turkish  

Home




Code of Varying Usefulness - Trigeminal Software, Inc. (English)

The following is a collection of sample code of varying usefulness. Give them a try. You never can tell...


ExpandUsefulOfficeExports - Over 50 exports from the Office DLL
ExpandADO_to_DAO - Convert an ADO Connection object to a DAO Database Object
ExpandbasHebrewAndGregorian - Convert dates from the Gregorian to the Hebrew Calendar and back
ExpandConnect - Finding out if you have an Internet connection
ExpandCalendarStuff - Get the (possibly localized) names of months and days
ExpandbasDatabasePassword - Retrieve the database password of any Jet 3.x/3.5x database
ExpandbasExecString - Execute a string from the VB6 IDE
ExpandbasIntlFormats - Handle currency, date, and time formats for other locales
ExpandUILangAndLangGroups - Handling some of the Windows 2000 UI Language and Language Group Functions
ExpandbasGUIDs - Guid Conversion functions for COM, Jet, and SQL Server
ExpandbasScriptJetSecurity - Script out security permissions in your databases
ExpandCode from VBPJ Article "Solving Cross-Codepage Problems"
CollapsebasInCodePage - Determine the Codepage to use When Converting Unicode to ANSI

One thing missing in the above article for VBPJ (and its sample code) is that it assumes you will know what codepage to use in its requirement for converting to Unicode to Ansi and back. Sometimes that is a fair assumption, sometimes not. When it's not, you need a way to look at an arbitrary string and know what codepage to use. Look at the module basInCodePage, especially at the functions FStringInCpg (takes a codepage and a string) and FStringInCpgEx (takes an LCID and a string). It will return "True" if the string is supported on the codepage/LCID in question.

Also included in this module is WToA and AToW functions that will do the actual conversion. If you will notice, they are all using the MSO* functions instead of the OS WideCharToMultiByte and MultiByteToWideChar.  These functions are a lot more flexible and handle more codepages than the OS versions will accept. Just pick which ones you want to use (the mso97 runtime that comes with V), the Office 8.0 dll, Office 9.0 dll, or the original OS functions) and go from there!


ExpandbasDebugEx - Debugging Functions
ExpandbasHijri - Determine the Use of Hijri Calendar and Conversion to/from Hijri Dates
ExpandCode from Smart Access Article "Is the Query Compiled?"
ExpandCode from Smart Access Article "Manage Replication Conflicts"
ExpandCode from Smart Access Article "Introducing the TSI Synchronizer Object"
ExpandbasIsValidIdent - Validate Names to Make Sure They Aren't VBA Keywords
ExpandAcheiving Callback Functionality in Access 97 and Office 97
ExpandbasDbcsSbcs - Convert SBCS to DBCS
ExpandbasLcidCp - Working with Language IDs, LCIDs, Code Pages, Character Sets etc.
ExpandbasServerList - Get a List of SQL Servers on an NT Domain
ExpandCode from VBPJ Article "Name That Language"
ExpandSimple MAPI
ExpandCopy NT file perms from one file or dir to another

Home

Problems with this site? Please contact the webmaster@trigeminal.com
with your comments, questions, or suggestions.