home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Zodiac Super OZ
/
MEDIADEPOT.ISO
/
FILES
/
13
/
VOL15N11.ZIP
/
TBWIZ.ZIP
/
MENUITEM.CLS
< prev
next >
Wrap
Text File
|
1996-02-24
|
1KB
|
50 lines
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
END
Attribute VB_Name = "tbMenuItem"
Attribute VB_Creatable = True
Attribute VB_Exposed = False
Option Explicit
Public VBInstance As Object
Public Operation As Integer
Public Sub AfterClick()
'___process menu line click events
Dim i%, j%
Dim MyProperty As Object
Dim testControl As Object
'___make sure form doesn't have unsaved changes
If Not CheckForDirt() Then
Select Case Operation
Case opLoad
Load tbLoadForm
Case opSave
Load tbSaveForm
End Select
End If
End Sub
Public Function CheckForDirt() As Boolean
'___warn user if form need to be saved
Dim CurrFormName$, i%
With gobjIDEAppInst.ActiveProject
CurrFormName$ = .ActiveForm.Properties.Item("Name")
With .Components
For i% = 0 To .Count - 1
If .Item(i%).Name = CurrFormName$ Then
If .Item(i%).IsDirty Then
CheckForDirt = True
Beep
Load SavePrmpt
Exit Function
End If
End If
Next
End With
End With
End Function