Post

Toaster

An overview of how the Toaster works and should be used.

Toaster

Toaster Overview

A very simple timed MsgBox alternative. It can be used as a regular MsgBox by setting the duration to 0, otherwise it’s meant to be used for toast notifications.

Toast

The Sub used to create a Toast style MsgBox that naturally times out without interaction.

1
2
3
Sub Toast(msg As String, duration As Integer, title As String, button_type As Integer)
    CreateObject("WScript.Shell").PopUp msg, duration, title, button_type
End Sub
  • msg
    The actual text displayed in the notificaton
  • duration
    How long until the notification disappears. Interacting stops it from timing out
  • title
    The title of the notification window
  • button_type
    An integer representing the type of window interface (Yes/No, Yes Only, etc)

To Call:

1
Toaster.Toast "Hello World!", 1, "Hi There", 4096

Creates:

Toast Notification

Toaster on Github

This post is licensed under CC BY 4.0 by the author.