Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

/Win/Windows Shortcuts/Resolve Shortcut
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/Windows Shortcuts/Resolve Shortcut
This example is the version from Sun, 17th Mar 2012.
Project "Resolve Shortcut.rbp"
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
EventHandler Sub Open() dim w as WindowsShortCutMBS dim f as FolderItem if targetwin32 then MsgBox "YOU must remove this msgbox and change the link in the source code!" f=SpecialFolder.Desktop.TrueChild("sol.exe.lnk") // you need to change this! if f=nil or f.Exists=false then // cancel quit end if MsgBox f.AbsolutePath w=new WindowsShortCutMBS w.Location=f.AbsolutePath if w.ResolveShortCut then MainWindow.showlink w else msgBox "Failed to resolve shortcut." quit end if else MsgBox "This example is only for Windows." quit end if End EventHandler
End Class
Class MainWindow Inherits Window
Control StaticText1 Inherits Label
ControlInstance StaticText1 Inherits Label
End Control
Control Location Inherits Label
ControlInstance Location Inherits Label
End Control
Control StaticText2 Inherits Label
ControlInstance StaticText2 Inherits Label
End Control
Control Description Inherits Label
ControlInstance Description Inherits Label
End Control
Control StaticText4 Inherits Label
ControlInstance StaticText4 Inherits Label
End Control
Control WorkingDirectory Inherits Label
ControlInstance WorkingDirectory Inherits Label
End Control
Control StaticText6 Inherits Label
ControlInstance StaticText6 Inherits Label
End Control
Control IconLocation Inherits Label
ControlInstance IconLocation Inherits Label
End Control
Control arguments Inherits Label
ControlInstance arguments Inherits Label
End Control
Control StaticText7 Inherits Label
ControlInstance StaticText7 Inherits Label
End Control
Sub showlink(w as WindowsShortCutmbs) Location.text=w.Target WorkingDirectory.text=w.WorkingDirectory IconLocation.text=w.Icon Description.text=w.Description arguments.Text=w.Arguments End Sub
End Class
End Project

See also:

Feedback, Comments & Corrections

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




Links
MBS Xojo PDF Plugins