Sample HTML function that displays a message box each time a Web page or HTA is loaded.

Visual Basic
Edit|Remove
Sub Window_Onload
    Msgbox "The application has started."
End Sub