Usage of Load and Unload in VB6.0

Usage of Load and Unload

  The load function is used to load the VB control, and the unload function is used to unload the VB control. The following is a specific example.

Ready to work

  Open VB6.0, create a new project, and create two windows with default names. In the first window, add two buttons "Open" and "Close".

Code


    Private Sub Command1_Click()  
    Load Form2  '加载窗口Form2
    Form2.Show  'Form2窗口显示
    End SUb

    Private Sub Command2_Click()  
    Unload Form2  
    End Sub

Guess you like

Origin blog.csdn.net/yue008/article/details/80587732