Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

/Win/Clipboard/Clipboard Files
Function:
You find this example project in your Plugins Download as a Xojo (Real Studio) project file within the examples folder: /Win/Clipboard/Clipboard Files
This example is the version from Sat, 24th Apr 2015.
Project "Clipboard Files.rbp"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control List Inherits Listbox
ControlInstance List Inherits Listbox
End Control
Control PushButton1 Inherits PushButton
ControlInstance PushButton1 Inherits PushButton
EventHandler Sub Action() dim f as FolderItem = SpecialFolder.Desktop dim c as integer = f.Count dim paths() as string for i as integer = 1 to c dim t as FolderItem = f.TrueItem(i) if t <> nil and t.Visible and not t.Directory then // use nativePath in newer Xojo versions paths.Append t.AbsolutePath end if next dim cl as new WindowsClipboardMBS if cl.setFiles(paths) then update else MsgBox "Failed to put paths on Clipboard." end if End EventHandler
End Control
EventHandler Sub Activate() update End EventHandler
Sub Update() List.DeleteAllRows dim c as new WindowsClipboardMBS dim paths() as string = c.GetFiles if paths <> nil then for each p as string in paths List.AddRow p next end if End Sub
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 Win Plugin.




Links
MBS Xojo tutorial videos