vb6-utilitieslisted
Install: claude install-skill alexcassol/claude-vb6-skills
# VB6 Utilities Catalog
VB6 codebases typically maintain a shared utility module (commonly named
`modUtils`, `modFuncoes`, `modCommon`, or similar) that accumulates helpers
over years of development. Before writing a utility function from scratch,
check whether one already exists.
This catalog describes the functions you are most likely to find. **Names and
exact signatures vary per project**; the names below are representative of
the patterns to look for.
## Conventions
### `fg_` prefix — "function global"
Many codebases use the `fg_` prefix for stateless utility functions exposed
project-wide. Examples: `fg_isNull`, `fg_Coalesce`, `fg_InIDE`. When you see
this prefix, treat the function as part of the utility layer — reusable,
side-effect-free, safe to call from anywhere.
### Dialog wrappers — `MsgBoxXxx`
Most projects wrap `MsgBox` to integrate with logging, theming, and consistent
button layouts. Typical names: `MsgBoxCritical`, `MsgBoxInfo`, `MsgBoxWarning`,
`MsgBoxQuestion`, `MsgBoxOption`. **Use the wrapper, not raw `MsgBox`**.
## 1. NULL handling
### `fg_isNull(value, defaultValue) As Variant`
Returns `defaultValue` when `value` is `Null`, otherwise returns `value`.
Equivalent to SQL's `ISNULL` or `COALESCE` with one fallback.
```vb
strName = fg_isNull(rs("custName").Value, "")
lngCount = fg_isNull(rs("total").Value, 0)
```
### `fg_Coalesce(value1, value2, ...) As Variant`
Returns the first non-`Null` value in the list, or `Null` if all are `Null`.
```vb