Never mix SingleUse and MultiUse classes
ActiveX components written in VB can contain both SingleUse and MultiUse classes at the same time. It usually isn’t a good idea to use both types of classes in the
ActiveX components written in VB can contain both SingleUse and MultiUse classes at the same time. It usually isn’t a good idea to use both types of classes in the
Private Declare Function PrinterProperties Lib “winspool.drv” (ByVal hwnd As _ Long, ByVal hPrinter As Long) As LongPrivate Declare Function OpenPrinter Lib “winspool.drv” Alias “OpenPrinterA” _ (ByVal pPrinterName As String, phPrinter
The Procedure Attributes dialog includes a Procedure ID combo box, that lets you associate a particular ID to a given member of the class. You usually use this combo to
The standard way to move a captionless form is to execute some tricky code from within the MouseDown event procedure. More advanced VB developers can reach the same result by
Here’s the correct declaration of the CopyMemory API function, which is so useful whenever you want to move a block of bytes between two memory locations: Declare Sub CopyMemory Lib
‘ Return the extension of a file nameFunction GetFileExtension(ByVal FileName As String) As String Dim i As Long For i = Len(FileName) To 1 Step -1 Select Case Mid$(FileName, i,
‘ Retrieve a file’s path” Note: trailing backslashes are never included in the resultFunction GetFilePath(FileName As String) As String Dim i As Long For i = Len(FileName) To 1 Step
‘ Retrieve a file’s base name’ if the second argument is true, the result include the file’s pathFunction GetFileBaseName(FileName As String, Optional ByVal IncludePath As _ Boolean) As String Dim
‘ Make a complete file name by assemblying its individual parts’ if Extension isn’t omitted, it overwrites any extension held in BaseNameFunction MakeFileName(Drive As String, Path As String, BaseName As