Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

/Util/File Length Example
Function:
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/File Length Example
This example is the version from Sun, 17th Mar 2012.
Project "File Length Example.rbp"
FileTypes
Filetype special/any
End FileTypes
Class Window1 Inherits Window
Control StaticText1 Inherits Label
ControlInstance StaticText1 Inherits Label
End Control
Control StaticText2 Inherits Label
ControlInstance StaticText2 Inherits Label
End Control
Control StaticText3 Inherits Label
ControlInstance StaticText3 Inherits Label
End Control
Control StaticText4 Inherits Label
ControlInstance StaticText4 Inherits Label
End Control
Control StaticText5 Inherits Label
ControlInstance StaticText5 Inherits Label
End Control
Control StaticText6 Inherits Label
ControlInstance StaticText6 Inherits Label
End Control
Control Separator1 Inherits Separator
ControlInstance Separator1 Inherits Separator
End Control
Control StaticText7 Inherits Label
ControlInstance StaticText7 Inherits Label
End Control
Control StaticText8 Inherits Label
ControlInstance StaticText8 Inherits Label
End Control
Control pd Inherits Label
ControlInstance pd Inherits Label
End Control
Control ld Inherits Label
ControlInstance ld Inherits Label
End Control
Control pr Inherits Label
ControlInstance pr Inherits Label
End Control
Control lr Inherits Label
ControlInstance lr Inherits Label
End Control
Control pt Inherits Label
ControlInstance pt Inherits Label
End Control
Control pl Inherits Label
ControlInstance pl Inherits Label
End Control
Control dlen Inherits Label
ControlInstance dlen Inherits Label
End Control
Control rlen Inherits Label
ControlInstance rlen Inherits Label
End Control
EventHandler Sub DropObject(obj As DragItem, action As Integer) do if obj.folderItemavailable then run obj.folderItem end if loop until not obj.nextItem End EventHandler
EventHandler Sub Open() run app.ApplicationFileMBS me.acceptfileDrop "special/any" End EventHandler
Sub run(f as folderItem) if f<>nil then pd.text=format(f.PhysicalFileDataLengthMBS,"-0") pr.text=format(f.PhysicalFileResLengthMBS,"-0") pt.text=format(f.PhysicalFileTotalLengthMBS,"-0") ld.text=format(f.LogicalFileDataLengthMBS,"-0") lr.text=format(f.LogicalFileResLengthMBS,"-0") pl.text=format(f.LogicalFileTotalLengthMBS,"-0") dlen.text=format(f.length,"-0") rlen.text=format(f.resourceForkLength,"-0") end if End Sub
End Class
MenuBar Menu
MenuItem UntitledMenu3 = ""
MenuItem UntitledMenu2 = "File"
MenuItem FileQuit = "Quit"
MenuItem UntitledMenu0 = "Edit"
MenuItem EditUndo = "Undo"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "Cut"
MenuItem EditCopy = "Copy"
MenuItem EditPaste = "Paste"
MenuItem EditClear = "Clear"
End MenuBar
Class App Inherits Application
End Class
End Project

See also:

Feedback, Comments & Corrections

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




Links
MBS Xojo Plugins