Category Archives: Visual Basic 6 (VB6)

Quick Mixer V1.8.3

Quick Mixer is a tray-agent alternative to the Windows Volume Control (SNDVOL32.EXE). Attachments File Uploaded Size 1056-20191007-094451-QMixer.zip 10/7/2019 9:44:51 AM 154465

CPUVB

General purpose CPU identification program. With this DLL you can: Attachments File Uploaded Size 1057-20191007-094805-cpuvb.zip 10/7/2019 9:48:05 AM 57112

How to Control a Shelled Application

This module will allow you to launch a shelled task, and monitor if it is running or not. Module Option Explicit ‘Structures declarationPrivate Type STARTUPINFO    cb As Long    lpReserved As String    lpDesktop As String    lpTitle As String    dwX As Long    dwY As Long    dwXSize As Long    dwYSize As Long    dwXCountChars As Long    dwYCountChars As Long    dwFillAttribute As Long    dwFlags As Long    wShowWindow As Integer    cbReserved2 As Integer    lpReserved2 As Long    hStdInput As Long    hStdOutput As… Read More »

Monitor Printer Queues

Allows you to check the number of waiting print jobs on network printers. Option Explicit ‘Constants DefinitionPublic Const CCHDEVICENAME = 32Public Const CCHFORMNAME = 32Public Const PRINTER_ACCESS_ADMINISTER = &H4Public Const PRINTER_ACCESS_USE = &H8 ‘Types DefinitionPublic Type DEVMODE    dmDeviceName As String * CCHDEVICENAME    dmSpecVersion As Integer    dmDriverVersion As Integer    dmSize As Integer    dmDriverExtra As Integer    dmFields As Long    dmOrientation As Integer    dmPaperSize As Integer    dmPaperLength As Integer    dmPaperWidth As… Read More »

Load a combo box using DAO

Another, older method of loading a combo box, this time via a DAO connection. Public Sub LoadCombo()    Dim MyDatabase As DAO.Database ‘Use this method if you are also using ADO    Dim MyRecordset As DAO.Recordset ‘ Use it anyways save an error or Type Mismatch    Dim MySql As String     MySql = “SELECT DISTINCT [Item] FROM [Table] WHERE [Item]='” & strVar & “‘”… Read More »

Data grid print class

A class to print and print preview a data grid with the option to flow the grid across a number of pages – just like the Excel print process… Attachments File Uploaded Size 1055-20191004-081653-DataGridPrinter_SRC.zip 10/4/2019 8:16:53 AM 90617

Delete Records using ADODB

Delete a record from a Combo Box selection Using Access Database. Put a Combobox and a Command Button on a form Create an Access Database Form_Load    With Combo1        .Clear        .AddItem “David”        .AddItem “Bob”    End WithEnd Sub Public Sub Command1_Click()    Dim MyConn As New ADODB.Connection    Dim MySql As String     With MyConn        .ConnectionString = strJetProvider        .Open    End With    MySql = “DELETE FROM SQL WHERE ”    MySql = MySql & ” [Field] ='”… Read More »

Load a combo box using ADODB

Although this code could tightened up a bit, it demonstrates how to load a combo box with data from an Access database, via an ADODB connection. Place on a form a combo box and a command button Public Const strJetProvider = “Provider=Microsoft.Jet.OLEDB.3.51;DataSource=C:\myaccess.mdb”Public sub Command1_Click()     Dim MyConn As New ADODB.Connection    Dim MyRst As New ADODB.Recordset    Dim strTemp As String     With MyConn        .ConnectionString… Read More »

Run a Stored Procedure with ADO

Sometimes you have stored proc that takes 2,3 or 5 min to execute. Application that lock up frequently frustrates users and waste their time and resources. Solution use ADO ASYNCHROUS OPTION to get back CPU resorces. Public Sub ExecuteAsync()    Dim cmd As ADODB.Command        Set cmd = New ADODB.Command    cmd.ActiveConnection = “DSN=test”    cmd.CommandTimeout = 180    cmd.CommandText = “sp_name”    cmd.CommandType = adCmdStoredProc    cmd.EXECUTE , , adAsyncExecute ‘<—… Read More »

Internet Timer

Calculate the time that your internet connection is active. Module Private Declare Function RasEnumConnections Lib “rasapi32.dll” Alias “RasEnumConnectionsA” (lpRasConn As Any, lpcb As Long, lpcConnections As Long) As Long Public Const RAS_MAXENTRYNAME As Integer = 256Public Const RAS_MAXDEVICETYPE As Integer = 16Public Const RAS_MAXDEVICENAME As Integer = 128Public Const RAS_RASCONNSIZE As Integer = 412Public Const ERROR_SUCCESS = 0… Read More »