Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

/Win/Watch directory on Windows
Function:
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/Watch directory on Windows
This example is the version from Sun, 17th Mar 2012.
Project "Watch directory on Windows.rbp"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control Timer1 Inherits Timer
ControlInstance Timer1 Inherits Timer
EventHandler Sub Action() check End EventHandler
End Control
Control List Inherits Listbox
ControlInstance List Inherits Listbox
End Control
EventHandler Sub Open() w = new WindowsDirectoryWatcherMBS if w.AddDirectory(SpecialFolder.Desktop, true, w.kNotifyChangeCreation + w.kNotifyChangeFilename + w.kNotifyChangedirname + w.kNotifyChangeSize + w.kNotifyChangeLastWrite) then check timer1.Mode = 2 end if End EventHandler
Sub check() dim c as WindowsDirectoryChangeMBS = w.NextChange while c <> nil dim ak as string Select case c.Action case c.kActionAdded ak = "Added" case c.kActionModified ak = "Modified" case c.kActionRemoved ak = "Removed" case c.kActionRenamedNewName ak = "Renamed, New Name" case c.kActionRenamedOldName ak = "Renamed, Old Name" else ak = "?" End Select List.AddRow ak List.cell(list.lastindex,1) = c.Filename c = w.NextChange wend End Sub
Property w As WindowsDirectoryWatcherMBS
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 FileMaker Plugins