Equinox Online Help - Language Reference - A to Z

Home

BreakPressed

Applies to
SyntaxBreakPressed
Action[Function] Returns true if the user has pressed Control Break
ScopeUsable anywhere
Notes

This function allows the developer to intercept the user's attempt to interrupt a method and act appropriately. Each time it is executed it resets the break condition. The function is most useful if automatic Control Break handling is not enabled.

CategoryFlow Control
See Also Block_EndBlock, Continue, Execute, EnableInput, Exit, For...Next, Goto, If_Then, Repeat_Until, Return, Sleep, Subtable, Switch, While_EndWhile
Example

This example displays a dialog if the user tries to interrupt a Process.

At Start of Task event
EnableInput False
Each Record event
if BreakPressed then
AlertButtons "No", "Yes"
Alert "Are you Sure you want to interrupt this operation ?"
if SysReply = 2 then Exit Module
end if