home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Best of Windows 95.com 1996 September
/
WIN95_09964.iso
/
text
/
DANA104.ZIP
/
TSRTMPL.DAS
< prev
next >
Wrap
Text File
|
1995-09-02
|
2KB
|
127 lines
'
' TSR Script Template
'
Const STATE_INIT = 0
Const STATE_BEFORE_OPEN = 1
Const STATE_AFTER_OPEN = 2
Const STATE_AFTER_NEW = 3
Const STATE_BEFORE_SAVE = 4
Const STATE_AFTER_SAVE = 5
Const STATE_BEFORE_CLOSE= 6
Const STATE_BEFORE_EXIT = 7
Const STATE_KEY_PRESS = 8
Const STATE_CHAR = 9
Const STATE_ENTER = 10
Const STATE_TIMER = 11
Const STATE_ACTIVATE = 12
Main ()
Select Case .DanaState
Case STATE_INIT
StayResident()
Case STATE_BEFORE_OPEN
OnBeforeOpen(.ParmStrA)
Case STATE_AFTER_OPEN
OnAfterOpen()
Case STATE_AFTER_NEW
OnAfterNew()
Case STATE_BEFORE_SAVE
OnBeforeSave(.ParmStrA)
Case STATE_AFTER_SAVE
OnAfterSave(.ParmStrA)
Case STATE_BEFORE_CLOSE
OnBeforeClose()
Case STATE_BEFORE_EXIT
OnBeforeExit()
Case STATE_KEY_PRESS
OnKeyPress(.ParmA, .ParmB)
Case STATE_CHAR
OnChar(.ParmA)
Case STATE_ENTER
OnEnter()
Case STATE_TIMER
OnTimer()
Case STATE_ACTIVATE
OnActivate()
Case Else
End Select
End
'/////////////////////////////////////////////////////////
' Message handlers
'///////////////////////////////
' Before open file
Proc OnBeforeOpen(strName$)
End Proc
'///////////////////////////////
' After open file
Proc OnAfterOpen()
End Proc
'///////////////////////////////
' After new file
Proc OnAfterNew()
End Proc
'///////////////////////////////
' Before save file
Proc OnBeforeSave(strName$)
End Proc
'///////////////////////////////
' After save file
Proc OnAfterSave(strName$)
End Proc
'///////////////////////////////
' Before close file
Proc OnBeforeClose()
End Proc
'///////////////////////////////
' Before exit Dana
Proc OnBeforeExit()
End Proc
'///////////////////////////////
' Key pressed
Proc OnKeyPress(nKey%, nShift%)
End Proc
'///////////////////////////////
' Char input
Proc OnChar(nChar%)
End Proc
'///////////////////////////////
' Enter key pressed
Proc OnEnter()
End Proc
'///////////////////////////////
' 1 second interval
Proc OnTimer()
End Proc
'///////////////////////////////
' Being activated current window
Proc OnActivate()
End Proc