Platforms to show: All Mac Windows Linux Cross-Platform

/ComputerControl/Drag and Drop


Required plugins for this example: MBS ComputerControl Plugin

You find this example project in your Plugins Download as a Xojo project file within the examples folder: /ComputerControl/Drag and Drop

This example is the version from Sun, 23th Sep 2017.

Project "Drag and Drop.xojo_binary_project"
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 Timer1 Inherits Timer
ControlInstance Timer1 Inherits Timer
EventHandler Sub Action() mode=mode+1 if mode=2 then call RemoteControlMBS.MacMoveMouse sx,sy end if if mode=3 then call RemoteControlMBS.MacMouseClick sx,sy,true,true end if if mode=4 then call RemoteControlMBS.MacMouseClick sx,sy,true,False end if if mode=5 then call RemoteControlMBS.MacMouseClick sx,sy,true,true end if if mode=6 then call RemoteControlMBS.MacMouseClick dx,dy,true,true end if if mode=7 then call RemoteControlMBS.MacMouseClick dx,dy,true,false end if if mode=8 then call RemoteControlMBS.MacMoveMouse cx,cy end if if mode=10 then beep mode=1 me.mode=0 end if End EventHandler
End Control
Control StaticText6 Inherits Label
ControlInstance StaticText6 Inherits Label
End Control
EventHandler Function KeyDown(Key As String) As Boolean if key="s" then sx=System.MouseX sy=System.Mousey StaticText2.text="source: "+str(sx)+" / "+str(sy) elseif key="d" then dx=System.MouseX dy=System.Mousey StaticText4.text="dest: "+str(dx)+" / "+str(dy) elseif key="r" then cx=System.Mousex cy=System.mousey if mode<=1 then mode=2 Timer1.Mode=2 end if end if End EventHandler
EventHandler Sub Open() if targetmacho then // ok else msgBox "This target is for Mac OS X only." end if End EventHandler
Property Protected cx As integer
Property Protected cy As integer
Property Protected dx As integer
Property Protected dy As integer
Property Protected mode As integer
Property Protected sx As integer
Property Protected sy As integer
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 ComputerControl Plugin.


The biggest plugin in space...