# GLOBAL_RES module
{: .no_toc }

A standard module that exposes a pre-instantiated [**cRes**](/tB/Packages/Contributed/TBMANLIB_RES/cRes/index.md) object as a public variable, providing package-wide access to resource loading without requiring a separate **cRes** instance.

## Members

### Res

A pre-instantiated **cRes** object.

```tb check_build
Public Res As New cRes
```

Because of **As New**, the instance is created automatically the first time **Res** is referenced. It provides the same interface as a manually constructed **cRes** instance: [**Read**](/tB/Packages/Contributed/TBMANLIB_RES/cRes/Read.md), [**ReturnBytes**](/tB/Packages/Contributed/TBMANLIB_RES/cRes/ReturnBytes.md), [**ReturnString**](/tB/Packages/Contributed/TBMANLIB_RES/cRes/ReturnString.md), [**ReturnHex**](/tB/Packages/Contributed/TBMANLIB_RES/cRes/ReturnHex.md), [**ReturnBase64**](/tB/Packages/Contributed/TBMANLIB_RES/cRes/ReturnBase64.md), and [**ReturnPicture**](/tB/Packages/Contributed/TBMANLIB_RES/cRes/ReturnPicture.md).

> [!NOTE] timeless
> **GLOBAL_RES.Res** is a single shared instance for the entire project. Calling **Res.Read** replaces its internal byte buffer. If multiple callers read different resources in the same execution path, use separate **cRes** instances rather than sharing **GLOBAL_RES.Res**.

## Example

This example loads a PNG resource and assigns it to a **PictureBox** control.

```tb check_build
Private Sub Form_Load()
    Picture1.Picture = GLOBAL_RES.Res.Read(101, "PNG").ReturnPicture()
End Sub
```

## See Also

- [cRes](/tB/Packages/Contributed/TBMANLIB_RES/cRes/index.md) class -- loads and converts binary resources embedded in the project
- [TBMANLIB_RES](/tB/Packages/Contributed/TBMANLIB_RES/index.md) package -- overview
