You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Util/Disable force quit Win
Class Window1 Inherits Window
Control StaticText1 Inherits Label
ControlInstance StaticText1 Inherits Label
End Control
Control PushButton1 Inherits PushButton
ControlInstance PushButton1 Inherits PushButton
EventHandler Sub Action()
quit
End EventHandler
End Control
EventHandler Sub Close()
quit
End EventHandler
EventHandler Sub Open()
dim p as ProcessMBS
p=new ProcessMBS
p.getcurrentProcess
if not p.SetServiceMode(true) then
msgBox "Problem with SetServiceMode!"
end if
End EventHandler
End Class
MenuBar Menu
MenuItem UntitledMenu3 = ""
MenuItem UntitledMenu2 = "File"
MenuItem FileQuit = "Quit"
MenuItem UntitledMenu0 = "Edit"
MenuItem EditUndo = "Undo"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "Cut"
MenuItem EditCopy = "Copy"
MenuItem EditPaste = "Paste"
MenuItem EditClear = "Clear"
End MenuBar
Class App Inherits Application
End Class