Xojo Conferences

Platforms to show: All Mac Windows Linux Cross-Platform

/MacCF/Background App with Dialog/Background App with Dialog
Required plugins for this example: MBS MacCF Plugin, MBS Main Plugin, MBS Util Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /MacCF/Background App with Dialog/Background App with Dialog
This example is the version from Sun, 17th Mar 2012.
Project "Background App with Dialog.rbp"
Filetype text
End FileTypes
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
Control StaticText2 Inherits Label
ControlInstance StaticText2 Inherits Label
End Control
End Class
MenuBar MenuBar1
MenuItem UntitledMenu1 = ""
MenuItem FileMenu = "&File"
MenuItem FileQuit = "Quit"
MenuItem EditMenu = "&Edit"
MenuItem EditUndo = "&Undo"
MenuItem UntitledMenu0 = "-"
MenuItem EditCut = "Cu&t"
MenuItem EditCopy = "&Copy"
MenuItem EditPaste = "&Paste"
MenuItem EditClear = "Clear"
End MenuBar
Class App Inherits Application
EventHandler Sub Open() c=new MyCarbonApplicationEventsMBS c.Listen const activeFlag = 1 const btnState = 128 const cmdKey = 256 const shiftKey = 512 const alphaLock = 1024 const optionKey = 2048 const controlKey = 4096 const rightShiftKey = 8192 const rightOptionKey = 16384 const rightControlKey = 32768 h=new CarbonHotKeyMBS h.AddKey(&h24, optionKey+shiftKey, OSTypeFromStringMBS("MBSG"), 5) End EventHandler
Property Protected c As MycarbonApplicationEventsMBS
Property Protected h As CarbonhotKeyMBS
End Class
Class MyCarbonApplicationEventsMBS Inherits CarbonApplicationEventsMBS
EventHandler Sub HotKeyPressed(signature as integer, id as integer) if StringFromOSTypeMBS(signature)="MBSG" and id=5 then app.FrontmostMBS=true // bring this application to front Window1.show end if End EventHandler
End Class
ExternalFile Resource
End ExternalFile
End Project

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS MacCF Plugin.

MBS Xojo Plugins