Перекрестные ссылки на форму и класс |
Option Compare Database Private WithEvents m_appFrm As Form Public Sub init(ByRef frm As Form) Debug.Print "init" Set m_appFrm = frm m_appFrm.OnUnload = "[Event Procedure]" m_appFrm.OnClose = "[Event Procedure]" End Sub Public Sub deinit() Set m_appFrm = Nothing End Sub Private Sub m_appFrm_Unload(Cancel As Integer) Debug.Print "m_appFrm_Unload" End Sub Private Sub m_appFrm_Close() Debug.Print "m_appFrm_Close" End Sub Private Sub Class_Initialize() Debug.Print "Class_Initialize" Set m_appFrm = Nothing End Sub Private Sub Class_Terminate() Debug.Print "Class_Terminate" Set m_appFrm = Nothing End Sub
Option Compare Database Option Explicit Private cls As New clsSuperClass Private Sub Form_Load() cls.init Me End Sub Private Sub Form_Unload(Cancel As Integer) 'Set cls = Nothing End Sub
http://www.sql.ru/forum/1294501/perekrestnye-ssylki-na-formu-i-klass
Комментировать | « Пред. запись — К дневнику — След. запись » | Страницы: [1] [Новые] |