Chilkat ActiveX Object Creation in VB6 (Visual Basic 6.0)

Most ActiveX objects, including Chilkat, provide what is called a “dual interface”.   A dual interface allows for programs to bind at compile-time (early binding) or at runtime (late binding). The type of binding is determined by how the object is created.  For example, compile-time binding in VB6 looks like this: Dim cert As New ChilkatCert Runtime binding looks like this: […]

Using the Chilkat ActiveX in VB6

To use the Chilkat ActiveX in a Visual Basic 6.0 program, review each of these items to make sure you’re doing everything correctly: Make sure you’re using the 32-bit ActiveX, even on 64-bit Windows. The ActiveX must be registered (via regsvr32) on each computer.  If you’re having trouble, try using the .msi installer available here: Chilkat 32-bit ActiveX MSI Installer […]

VB6 FTP File Upload Progress Monitoring

Question: I’ve been trying to get the progress bar in VB6 to work, based on the code on your website, but I’m having no luck.  The event isn’t even being triggered. Answer: Here are some things to try: Test progress monitoring with a large enough file  such that the progress does not go from 0 to 100% instantly. Use the […]

How to use an ActiveX in VB6

There are two ways to reference an ActiveX in Visual Basic 6.0.  The first is to select “Project–>References” from the VB6 menu.  The second way is to select “Project–>Components…” from the VB6 menu. Important:  You should do one or the other, but not both. Which do you choose?   Use “Project–>References” if you are going to instantiate the ActiveX dynamically.  In […]

SFTP Upload in VB6 with Progress Monitoring

The PercentDone event is called when the percentage completion increases by one or more points.  To use events in VB6, Dim the variable WithEvents.  Then name the event callback using the variable name.  (You should already understand how to use VB6 events in general prior to using the Chilkat objects.  A good VB6 book is “Programming Visual Basic 6.0” by […]

VB6 Variant vs Byte Array

In Visual Basic 6.0, a Variant containing a byte array is different than a byte array. For example, examine this code: ‘ Assume mime is a ChilkatMime object… Set mimePart = mime.GetPart(1) thefile = FreeFile() ‘Get the attachment filename FileName = mimePart.FileName ‘Get the attachment Dim mBody As Variant mBody = mimePart.GetBodyBinary If Len(mBody) > 0 Then Open FileName For […]

Visual Basic Font.Charset Property

Charset Name Charset Value (Hex) Charset Value (Decimal) Code-Page ID ANSI_CHARSET 0x00 0 1252 DEFAULT_CHARSET 0x01 1 SYMBOL_CHARSET 0x02 2 SHIFTJIS_CHARSET 0x80 128 932 HANGUL_CHARSET 0x81 129 949 GB2312_CHARSET 0x86 134 936 CHINESEBIG5_CHARSET 0x88 136 950 GREEK_CHARSET 0xA1 161 1253 TURKISH_CHARSET 0xA2 162 1254 HEBREW_CHARSET 0xB1 177 1255 ARABIC_CHARSET 0xB2 178 1256 BALTIC_CHARSET 0xBA 186 1257 RUSSIAN_CHARSET 0xCC 204 1251 […]