Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

/Util/Shared Memory
Function:
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Util/Shared Memory
This example is the version from Wed, 10th Jul 2018.
Project "Shared Memory.rbp"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control DeleteButton Inherits PushButton
ControlInstance DeleteButton Inherits PushButton
EventHandler Sub Action() dim b as Boolean = FileMappingMBS.DeleteSharedMemory(TextName.text) if b then MsgBox "OK" else MsgBox "Failed" end if End EventHandler
End Control
Control Label1 Inherits Label
ControlInstance Label1 Inherits Label
End Control
Control TextName Inherits TextField
ControlInstance TextName Inherits TextField
End Control
Control Label2 Inherits Label
ControlInstance Label2 Inherits Label
End Control
Control TextValue Inherits TextArea
ControlInstance TextValue Inherits TextArea
End Control
Control SetButton Inherits PushButton
ControlInstance SetButton Inherits PushButton
EventHandler Sub Action() dim data as MemoryBlock = ConvertEncoding(TextValue.text, encodings.UTF8) dim b as Boolean = FileMappingMBS.SetSharedMemoryValue(TextName.text, data) if b then MsgBox "OK" else MsgBox "Failed" end if End EventHandler
End Control
Control GetButton Inherits PushButton
ControlInstance GetButton Inherits PushButton
EventHandler Sub Action() dim data as MemoryBlock = FileMappingMBS.GetSharedMemoryValue(TextName.text) if data = nil then MsgBox "Failed" else dim s as string = DefineEncoding(data, encodings.UTF8) TextValue.Text = s end if End EventHandler
End Control
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

Feedback, Comments & Corrections

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




Links
MBS Xojo Plugins