⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mdlunloadform.bas

📁 旅行社管理信息系统主要实现旅游路线、景点、交通工具等的查询、修改和删除功能
💻 BAS
字号:
Attribute VB_Name = "mdlUnloadForm"
Option Explicit

Public Sub sfFormsUnload() '(ByRef frm As Variant)

    '---------------------------------------------------
    'Purpose: unloads all forms other than one
    'Inputs:  Form to leave loaded,typically the main form
    'Passed:  None
    'Returns: safe Error Message
    'Outputs: All other forms are affected
    'Notes  : Used in the main form unload to
    '         ensure all other forms are unloaded
    'Usage:  call sfFormsUnload
    '-----------------------------------------------------
    Dim Frm As Form
    
    On Error GoTo Errtrap
    ' 在窗体集合中循环
    ' 从内存中卸载所有的窗体
    For Each Frm In Forms
    '   If Not Frm Is frmApiCopy Then
            Frm.Hide ' 隐藏窗体
            Unload Frm          ' 卸载窗体
            Set Frm = Nothing ' 从内存中删除窗体
    '   End If
    Next
    
    Exit Sub
Errtrap:
    On Error GoTo 0
     MsgBox Err.Description, vbExclamation
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -