JavaScript Editor JavaScript Editor     JavaScript Debugger

Previous Section Next Section

Main Page

Passing Forms to Procedures

You can pass forms to procedures just as you would any object. Here, we've set up a Sub procedure, ColorWindowRed, to turn the background color of a form to red using the Form BackColor property:

Sub ColorWindowRed(ByVal FormToColor As Form)
    FormToColor.BackColor = System.Drawing.Color.Red
End Sub

This is a good technique to know if you want to coordinate between forms in a multiform application.

Previous Section Next Section

JavaScript Editor Free JavaScript Editor     JavaScript Editor