Xojo Conferences

Platforms to show: All Mac Windows Linux Cross-Platform

/Util/Threads/DelayMBS Thread Test
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/Threads/DelayMBS Thread Test
This example is the version from Sun, 17th Mar 2012.
Project "DelayMBS Thread Test.rbp"
Class App Inherits Application
Const kEditClear = "&Delete"
Const kFileQuit = "&Quit"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control ProgressBar1 Inherits ProgressBar
ControlInstance ProgressBar1 Inherits ProgressBar
End Control
Control Thread1 Inherits Thread
ControlInstance Thread1 Inherits Thread
EventHandler Sub Run() const DelayDontMPYield = 1 // Don't give additional time for other OS threads const DelayDontRBYield = 2 // Don't give REALbasic time for other REALbasic threads const DelayDontThreadYield = 4 // Don't give addition time for other OS threads const DelayDontQuickTimeYield = 8 // Don't give time for QuickTime Movieplayer const DelayDontWait = 16 // Don't give CPU time for other OS threads const DelayDontWaitNextEvent = 32 // Don't give CPU time to handle events on Mac OS X to avoid beachball cursor const DelayDontSleep = 64 // Don't give CPU time for other OS threads (Windows) dim mode as integer if CheckPauseThreads.Value then mode=mode+2 end if if CheckPauseProgressbar.Value then mode=mode+32 end if DelayMBS 20,mode //just hang around for 20 seconds beep //confirm we finished End EventHandler
End Control
Control PushButton1 Inherits PushButton
ControlInstance PushButton1 Inherits PushButton
EventHandler Sub Action() Thread1.run End EventHandler
End Control
Control StaticText1 Inherits Label
ControlInstance StaticText1 Inherits Label
End Control
Control Timer1 Inherits Timer
ControlInstance Timer1 Inherits Timer
EventHandler Sub Action() count=count+1 Title=str(count) End EventHandler
End Control
Control CheckPauseThreads Inherits CheckBox
ControlInstance CheckPauseThreads Inherits CheckBox
End Control
Control CheckPauseProgressbar Inherits CheckBox
ControlInstance CheckPauseProgressbar Inherits CheckBox
End Control
Property count As Integer
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

Feedback, Comments & Corrections

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

MBS Xojo Chart Plugins