Platforms to show: All Mac Windows Linux Cross-Platform

/Win/Windows Shortcuts/Resolve Shortcut
Feedback.

Function:
You find this example project in your Plugins Download as a Realbasic project file within the examples folder: /Win/Windows Shortcuts/Resolve Shortcut
This example is the version from Mon, 28th Feb 2010.
Notes: Last modified: Mon, 28th Feb 2010
Class App
Inherits Application
// Event implementations
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 Sub
End Class

Class MainWindow
Inherits Window
// Controls
ControlInstance
End ControlInstance
ControlInstance
End ControlInstance
ControlInstance
End ControlInstance
ControlInstance
End ControlInstance
ControlInstance
End ControlInstance
ControlInstance
End ControlInstance
ControlInstance
End ControlInstance
ControlInstance
End ControlInstance
ControlInstance
End ControlInstance
ControlInstance
End ControlInstance

// Methods
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


See also:




Links
MBS Realbasic PDF Plugins - Nachhilfe in Kretz