`
Par2: Trapping "X" out of a browse (template) 2009-08-28 -- Roberto Artigas Jr. #EXTENSION(ABCzKillEsc,'Kill Escape and "X"'),PROCEDURE #!--------------------------------------------------------------- #! #! #SHEET #TAB('Kill any attempt to Escape, Cancel or "X"') #IMAGE('CLARION.ICO'),AT(10,20) #DISPLAY ('Innovative Options cc'),AT(40,20) #DISPLAY ('Cape Town, South Africa'),AT(40,30) #DISPLAY ('Tel: +27 21 5526013 Fax: +27 21 5525582') #DISPLAY ('Email: innopt@iafrica.com') #DISPLAY (' ') #DISPLAY (' Default Message is;') #DISPLAY (' "Unauthorised termination method attempted"') #DISPLAY (' ') #DISPLAY (' Default title is; ERROR MESSAGE') #DISPLAY (' Default icon is; Hand') #DISPLAY (' ') #PROMPT('Message Text : ',@S90),%ProcMess #DISPLAY(' Protocol is: ''Message text'' ') #PROMPT('Message Title: ',@S30),%ProcTitle #DISPLAY(' Protocol is: ''Title text'' ') #PROMPT('Message Icon : ',@S15),%ProcIcon #! #ENDTAB #ENDSHEET #AT(%WindowManagerMethodCodeSection,'TakeCloseEvent','(),BYTE'),PRIORITY(4500) #DECLARE(%TvsKillMess) #DECLARE(%TvSKillTitle) #DECLARE(%TvSKillIcon) #DECLARE(%TvSKillCode) #IF(%ProcMess = ' ') #SET(%TvsKillMess,''' Unauthorised termination method attempted''') #ELSE #SET(%TvsKillMess,'' & CLIP(%ProcMess) & '') #ENDIF #IF(%ProcTitle = ' ') #SET(%TvSKillTitle,'''ERROR MESSAGE''') #ELSE #SET(%TvSKillTitle,'' & CLIP(%ProcTitle) & '') #ENDIF #IF(%ProcIcon = ' ') #SET(%TvSKillIcon,'Icon:Hand') #ELSE #SET(%TvSKillIcon,'Icon:' & CLIP(%ProcIcon)) #ENDIF #SET(%TvSKillCode,'MESSAGE(' & %TvSKillMess & ',' & %TvSKillTitle & ',' & %TvSKillIcon & ')') IF ((Event() = Event:CloseWindow) AND (Self.Response <> RequestCompleted)) %TvSKillCode Return(Level:Notify) END #ENDAT #! #! Printed November 21, 2024, 11:00 am This article has been viewed/printed 35214 times. |