Platforms to show: All Mac Windows Linux Cross-Platform

/Win/Process Statistics


Required plugins for this example: MBS Win Plugin

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

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

Project "Process Statistics.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control StaticText1 Inherits Label
ControlInstance StaticText1 Inherits Label
End Control
Control ProcessID Inherits Label
ControlInstance ProcessID Inherits Label
End Control
Control StaticText3 Inherits Label
ControlInstance StaticText3 Inherits Label
End Control
Control PageFaultCount Inherits Label
ControlInstance PageFaultCount Inherits Label
End Control
Control PeakWorkingSetSize Inherits Label
ControlInstance PeakWorkingSetSize Inherits Label
End Control
Control StaticText6 Inherits Label
ControlInstance StaticText6 Inherits Label
End Control
Control StaticText7 Inherits Label
ControlInstance StaticText7 Inherits Label
End Control
Control WorkingSetSize Inherits Label
ControlInstance WorkingSetSize Inherits Label
End Control
Control QuotaPeakPagedPoolUsage Inherits Label
ControlInstance QuotaPeakPagedPoolUsage Inherits Label
End Control
Control StaticText10 Inherits Label
ControlInstance StaticText10 Inherits Label
End Control
Control StaticText11 Inherits Label
ControlInstance StaticText11 Inherits Label
End Control
Control QuotaPagedPoolUsage Inherits Label
ControlInstance QuotaPagedPoolUsage Inherits Label
End Control
Control QuotaPeakNonPagedPoolUsage Inherits Label
ControlInstance QuotaPeakNonPagedPoolUsage Inherits Label
End Control
Control StaticText14 Inherits Label
ControlInstance StaticText14 Inherits Label
End Control
Control StaticText15 Inherits Label
ControlInstance StaticText15 Inherits Label
End Control
Control QuotaNonPagedPoolUsage Inherits Label
ControlInstance QuotaNonPagedPoolUsage Inherits Label
End Control
Control PagefileUsage Inherits Label
ControlInstance PagefileUsage Inherits Label
End Control
Control StaticText18 Inherits Label
ControlInstance StaticText18 Inherits Label
End Control
Control StaticText19 Inherits Label
ControlInstance StaticText19 Inherits Label
End Control
Control PeakPagefileUsage Inherits Label
ControlInstance PeakPagefileUsage Inherits Label
End Control
Control CycleTime Inherits Label
ControlInstance CycleTime Inherits Label
End Control
Control StaticText22 Inherits Label
ControlInstance StaticText22 Inherits Label
End Control
Control StaticText23 Inherits Label
ControlInstance StaticText23 Inherits Label
End Control
Control ReadOperationCount Inherits Label
ControlInstance ReadOperationCount Inherits Label
End Control
Control WriteOperationCount Inherits Label
ControlInstance WriteOperationCount Inherits Label
End Control
Control StaticText26 Inherits Label
ControlInstance StaticText26 Inherits Label
End Control
Control StaticText27 Inherits Label
ControlInstance StaticText27 Inherits Label
End Control
Control OtherOperationCount Inherits Label
ControlInstance OtherOperationCount Inherits Label
End Control
Control ReadTransferCount Inherits Label
ControlInstance ReadTransferCount Inherits Label
End Control
Control StaticText30 Inherits Label
ControlInstance StaticText30 Inherits Label
End Control
Control StaticText31 Inherits Label
ControlInstance StaticText31 Inherits Label
End Control
Control WriteTransferCount Inherits Label
ControlInstance WriteTransferCount Inherits Label
End Control
Control OtherTransferCount Inherits Label
ControlInstance OtherTransferCount Inherits Label
End Control
Control StaticText34 Inherits Label
ControlInstance StaticText34 Inherits Label
End Control
Control StaticText35 Inherits Label
ControlInstance StaticText35 Inherits Label
End Control
Control CreationTime Inherits Label
ControlInstance CreationTime Inherits Label
End Control
Control ExitTime Inherits Label
ControlInstance ExitTime Inherits Label
End Control
Control StaticText38 Inherits Label
ControlInstance StaticText38 Inherits Label
End Control
Control StaticText39 Inherits Label
ControlInstance StaticText39 Inherits Label
End Control
Control KernelTime Inherits Label
ControlInstance KernelTime Inherits Label
End Control
Control StaticText41 Inherits Label
ControlInstance StaticText41 Inherits Label
End Control
Control UserTime Inherits Label
ControlInstance UserTime Inherits Label
End Control
Control Timer1 Inherits Timer
ControlInstance Timer1 Inherits Timer
EventHandler Sub Action() update End EventHandler
End Control
Control BevelButton1 Inherits BevelButton
ControlInstance BevelButton1 Inherits BevelButton
EventHandler Sub Action() dim m as MemoryBlock = NewMemoryBlock(1024.0*rnd*1024.0) blocks.Append m End EventHandler
End Control
Control BevelButton2 Inherits BevelButton
ControlInstance BevelButton2 Inherits BevelButton
EventHandler Sub Action() if UBound(blocks)>=0 then dim m as MemoryBlock = blocks.Pop end if End EventHandler
End Control
EventHandler Sub Open() update End EventHandler
Sub update() dim p as new WindowsProcessStatisticsMBS ProcessID.text = str(p.ProcessID) if BitwiseAnd(p.Mode, p.ModeMemoryCounters)<>0 then // have memory values PageFaultCount.text = str(p.PageFaultCount) PeakWorkingSetSize.text = str(p.PeakWorkingSetSize) WorkingSetSize.text = str(p.WorkingSetSize) QuotaPeakPagedPoolUsage.text = str(p.QuotaPeakPagedPoolUsage) QuotaPagedPoolUsage.text = str(p.QuotaPagedPoolUsage) QuotaPeakNonPagedPoolUsage.text = str(p.QuotaPeakNonPagedPoolUsage) QuotaNonPagedPoolUsage.text = str(p.QuotaNonPagedPoolUsage) PagefileUsage.text = str(p.PagefileUsage) PeakPagefileUsage.text = str(p.PeakPagefileUsage) else PageFaultCount.text = "n/a" PeakWorkingSetSize.text = "n/a" WorkingSetSize.text = "n/a" QuotaPeakPagedPoolUsage.text = "n/a" QuotaPagedPoolUsage.text = "n/a" QuotaPeakNonPagedPoolUsage.text = "n/a" QuotaNonPagedPoolUsage.text = "n/a" PagefileUsage.text = "n/a" PeakPagefileUsage.text = "n/a" end if if BitwiseAnd(p.Mode, p.ModeCycleTime)<>0 then // have cycle time CycleTime.text = str(p.CycleTime) else CycleTime.text = "n/a" end if if BitwiseAnd(p.Mode, p.ModeIOCounters)<>0 then // have counts ReadOperationCount.text = str(p.ReadOperationCount) WriteOperationCount.text = str(p.WriteOperationCount) OtherOperationCount.text = str(p.OtherOperationCount) ReadTransferCount.text = str(p.ReadTransferCount) WriteTransferCount.text = str(p.WriteTransferCount) OtherTransferCount.text = str(p.OtherTransferCount) else ReadOperationCount.text = "n/a" WriteOperationCount.text = "n/a" OtherOperationCount.text = "n/a" ReadTransferCount.text = "n/a" WriteTransferCount.text = "n/a" OtherTransferCount.text = "n/a" end if if BitwiseAnd(p.Mode, p.ModeTimes)<>0 then // have times CreationTime.text = str(p.CreationTime) ExitTime.text = str(p.ExitTime) KernelTime.text = str(p.KernelTime) UserTime.text = str(p.UserTime) else CreationTime.text = "n/a" ExitTime.text = "n/a" KernelTime.text = "n/a" UserTime.text = "n/a" end if End Sub
Property blocks() As MemoryBlock
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&Ablage"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Bearbeiten"
MenuItem EditUndo = "&Rückgängig"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "&Ausschneiden"
MenuItem EditCopy = "&Kopieren"
MenuItem EditPaste = "&Einfügen"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "&Alles auswählen"
End MenuBar
End Project

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


The biggest plugin in space...