Platforms to show: All Mac Windows Linux Cross-Platform
/Picture/Icon/DropFile to see icon
Required plugins for this example: MBS Picture Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Picture/Icon/DropFile to see icon
This example is the version from Sun, 31th Aug 2013.
Project "DropFile to see icon.xojo_binary_project"
FileTypes
Filetype special/any
End FileTypes
Class Window1 Inherits Window
EventHandler Sub DropObject(obj As DragItem, action As Integer)
do
if obj.folderItemavailable then
file=obj.folderItem
Title = file.DisplayName
refresh
end if
loop until not obj.nextItem
End EventHandler
EventHandler Sub Open()
acceptfileDrop "special/any"
End EventHandler
EventHandler Sub Paint(g As Graphics, areas() As REALbasic.Rect)
dim p as picture
if file=nil then return
p=file.iconMBS(16)
g.drawpicture p,0,0
p=file.iconMBS(32)
g.drawpicture p,0,16
p=file.iconMBS(48)
g.drawpicture p,0,48
p=file.iconMBS(128)
g.drawpicture p,0,96
p=file.iconMBS(256)
g.drawpicture p,0,128+96
p=file.iconMBS(512)
g.drawpicture p,256,0
p=file.iconimageMBS(256)
g.drawpicture p,0,512
p=file.iconmaskMBS(256)
g.drawpicture p,256,512
p=file.iconMBS(256)
g.drawpicture p,512,512
p=file.iconMBS(1024)
g.drawpicture p,768,0
End EventHandler
Property Protected file As folderitem
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
The items on this page are in the following plugins: MBS Picture Plugin.