VBMAN Global Static Object Documentation
Overview
VBMAN is a global static object instance in VB6 projects. After referencing vbman.dll, it can be used anywhere in the VB6 project without manual New instantiation.
Core Advantages
- Zero Configuration: Use directly after referencing the DLL, no instantiation required
- Rich Features: Covers database, JSON, HTTP, file operations, encryption, and other common functions
- Chain Calling: Most objects support chain calling for cleaner code
- Type Safety: Complete strong type support with IDE auto-completion
- Production Verified: Widely used in multiple actual projects
Quick Start
vb
' Use directly after referencing vbman.dll
Dim Result As String
Result = VBMAN.Json.Encode(SomeObject)
' Database operation example
VBMAN.Db.Sql("SELECT * FROM users WHERE id=?").Param("id", 1).Fetch
' File operation example
VBMAN.ToolsFso.AutoMakeDir "C:\MyApp\Data"Sub-object List
Data Operations
| Object | Class | Description |
|---|---|---|
| Json | cJson | JSON parsing and building |
| Csv | cCsv | CSV file read/write |
| Ini | cIni | INI configuration file operations |
| Db | cDataBase | Database operations |
| Collection | cCollection | Enhanced collection class |
Network Communication
| Object | Class | Description |
|---|---|---|
| HttpClient | cHttpClient | HTTP client requests |
File and System
| Object | Class | Description |
|---|---|---|
| FileEx | cFileEx | Advanced file operations |
| ToolsFso | cToolsFso | File system operations |
| ToolsStream | cToolsStream | File stream operations |
| Regedit | cRegedit | Registry operations |
| StartUp | cStartUp | Startup management |
Utility Classes
| Object | Class | Description |
|---|---|---|
| ToolsStr | cToolsStr | String processing tools |
| ToolsMath | cToolsMath | Mathematical operation tools |
| ToolsHttp | cToolsHttp | HTTP utility functions |
| ToolsBase64 | cToolsBase64 | Base64 encoding/decoding |
| ToolsUtf8 | cToolsUtf8 | UTF-8 encoding/decoding |
| ToolsArray | cToolsArray | Array operation tools |
| ToolsDic | cToolsDic | Dictionary operation tools |
| ToolsList | cToolsList | List operation tools |
| ToolsSystem | cToolsSystem | System information tools |
| ToolsCrc | cToolsCrc | CRC checksum calculation |
| ToolsWindow | cToolsWindow | Window operation tools |
UI and Interaction
| Object | Class | Description |
|---|---|---|
| Dialog | cDialog | Dialog operations |
| Toast | cToast | Notification message display |
Other Functions
| Object | Class | Description |
|---|---|---|
| Logs | cLogs | Log recording |
| Cmd | cCmd | Command line execution |
| TimeUse | cTimeUse | Timing tools |
| PLI | cPLI | Plugin interface |
| QRcode | cQRcode | QR code generation |
| Password | cPassword | Password handling |
| Delay | cDelay | Delayed execution |
| Formater | cFormater | Formatting tools |
| Baidu | cBaidu | Baidu service interface |
Usage Patterns
Direct Usage Pattern
vb
' Simplest usage - global object direct call
Dim jsonText As String
jsonText = VBMAN.Json.Encode(myData)Chain Calling Pattern
vb
' Objects supporting chain calling can be called continuously
VBMAN.Db.Sql("SELECT * FROM users").Fetch
Debug.Print VBMAN.Db.Row("name")Independent Instance Pattern
vb
' When multiple independent instances are needed, create with New
Dim json1 As New cJson
Dim json2 As New cJson
json1.Item("key1") = "value1"
json2.Item("key2") = "value2"Reference Instructions
To use VBMAN in a VB6 project:
- Reference
vbman.dll(Project → References) - Ensure the DLL is in the same directory as the EXE, or configure the path correctly
- No additional declaration needed, access directly through the
VBMANobject