Platforms to show: All Mac Windows Linux Cross-Platform

/Util/Make Foreground Process


Required plugins for this example: MBS Util Plugin

You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Util/Make Foreground Process

This example is the version from Sun, 17th Mar 2012.

Project "Make Foreground Process.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Delete"
Const kFileQuit = "&Quit"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control PushButton1 Inherits PushButton
ControlInstance PushButton1 Inherits PushButton
EventHandler Sub Action() // get front process dim c as new ProcessMBS c.GetFrontProcess // get our process dim p as new ProcessMBS p.GetCurrentProcess // change process Title=str(p.TransformToForegroundApplication) // switch to old app c.FrontProcess=True // let the system switch DelayMBS 0.1 // switch to our app p.FrontProcess=True // Way back? Restart your app! End EventHandler
End Control
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&File"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Edit"
MenuItem EditUndo = "&Undo"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "Cu&t"
MenuItem EditCopy = "&Copy"
MenuItem EditPaste = "&Paste"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "Select &All"
End MenuBar
End Project

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


The biggest plugin in space...