[SerializableAttribute]
[XmlRootAttribute("ShortcutFileInfo")]
[TypeConverterAttribute(typeof(ExpandableObjectConverter))]
[DefaultPropertyAttribute("Target")]
public sealed class ShortcutFileInfo : FileSystemInfo
<SerializableAttribute>
<XmlRootAttribute("ShortcutFileInfo")>
<TypeConverterAttribute(GetType(ExpandableObjectConverter))>
<DefaultPropertyAttribute("Target")>
Public NotInheritable Class ShortcutFileInfo
Inherits FileSystemInfo
Dim instance As ShortcutFileInfo
[SerializableAttribute]
[XmlRootAttribute(L"ShortcutFileInfo")]
[TypeConverterAttribute(typeof(ExpandableObjectConverter))]
[DefaultPropertyAttribute(L"Target")]
public ref class ShortcutFileInfo sealed : public FileSystemInfo
[<SealedAttribute>]
[<SerializableAttribute>]
[<XmlRootAttribute("ShortcutFileInfo")>]
[<TypeConverterAttribute(typeof(ExpandableObjectConverter))>]
[<DefaultPropertyAttribute("Target")>]
type ShortcutFileInfo =
class
inherit FileSystemInfo
end
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
Dim lnk As New ShortcutFileInfo("C:\Test Shortcut.lnk")
lnk.Create()
With lnk
.Attributes = FileAttributes.Normal
.Description = "My shortcut description."
.Hotkey = Keys.Shift Or Keys.Alt Or Keys.Control Or Keys.F1
.Icon = "Shell32.dll"
.IconIndex = 0
.Target = "C:\Windows\Notepad.exe"
.TargetArguments = """C:\Windows\win.ini"""
.WindowState = ShortcutWindowState.Normal
.WorkingDirectory = Path.GetDirectoryName(lnk.Target)
End With
lnk.ViewMode = True
Me.PropertyGrid1.SelectedObject = lnk
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
ShortcutFileInfo(FileInfo) | Initializes a new instance of the ShortcutFileInfo class. |
ShortcutFileInfo(String) | Initializes a new instance of the ShortcutFileInfo class. |
Attributes | Gets or sets the file attributes of the shortcut file. |
CreationTime | Gets or sets the creation time of the shortcut file. |
CreationTimeUtc | Gets or sets the creation time, in coordinated universal time (UTC) of the shortcut file. |
Description | Gets or sets the shortcut description. |
Directory | Gets an instance of the parent directory of the shortcut file. |
DirectoryName | Gets a string representing the shortcut directory's full path. |
Exists |
Gets a value indicating whether the shortcut file exists.
(Overrides FileSystemInfoExists) |
Extension | Gets a string representing the extension part of the shortcut file. |
FullName |
Gets the full path of the shortcut file.
(Overrides FileSystemInfoFullName) |
Hotkey | Gets or sets the shortcut hotkey. |
Icon | Gets or sets the full path of the icon file. |
IconIndex | Gets or sets the image index within the icon file. |
IsReadOnly | Gets or sets a value that determines if the shortcut file is read-only. |
LastAccessTime | Gets or sets the time the shortcut file was last accessed. |
LastAccessTimeUtc | Gets or sets the time, in coordinated universal time (UTC), the shortcut file was last accessed. |
LastWriteTime | Gets or sets the time the shortcut file was last written to. |
LastWriteTimeUtc | Gets or sets the time, in coordinated universal time (UTC), the shortcut file was last written to. |
Length | Gets the file size, in bytes, of the current shortcut file. |
Name |
Gets the file name of the shortcut file.
(Overrides FileSystemInfoName) |
Target | Gets or sets the full path of the target file or directory. |
TargetArguments | Gets or sets the command-line arguments of the target. |
TargetDisplayName | Gets the display name of the target file or directory. Returns a empty string if the target does not exist. |
ViewMode | Gets or sets a value indicating whether this ShortcutFileInfo is in 'view mode', for example, being displayed in a PropertyGrid control. The shortcut file will not be modified while ViewMode is . |
WindowState | Gets or sets the window state for the target file or directory. |
WorkingDirectory | Gets or sets the working directory of the target file or directory. |
CopyTo | Copies an existing shortcut file to a new file, allowing the overwriting of an existing file. |
Create | Creates the shortcut file. It overwrites any existing file. |
CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject) |
Decrypt | Decrypts a shortcut file that was encrypted by the current account using the Encrypt method. |
Delete |
Deletes the shortcut file.
(Overrides FileSystemInfoDelete) |
Encrypt | Encrypts a shortcut file so that only the account used to encrypt the file can decrypt it. |
Equals |
(Overrides ObjectEquals(Object)) |
GetAccessControl | Gets a FileSecurity object that encapsulates the access control list (ACL) entries for the file described by the current ShortcutFileInfo object. |
GetAccessControl(AccessControlSections) | Gets a FileSecurity object that encapsulates the specified type of access control list (ACL) entries for the file described by the current ShortcutFileInfo object. |
GetHashCode |
(Overrides ObjectGetHashCode) |
GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject) |
GetType | Gets the Type of the current instance. (Inherited from Object) |
InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject) |
MoveTo | Moves the shortcut file to a new location, providing the option to specify a new file name. |
Open(FileMode) | Opens the shortcut file in the specified mode. |
Open(FileMode, FileAccess) | Opens the shortcut file in the specified mode with read, write, or read/write access. |
Open(FileMode, FileAccess, FileShare) | Opens the shortcut file in the specified mode with read, write, or read/write access and the specified sharing option. |
OpenRead | Creates a read-only FileStream. |
OpenWrite | Creates a write-only FileStream. |
Refresh | Refreshes the state of the object. |
Resolve | Resolves the target of a shortcut. This is useful when the target of a shortcut file is changed from a drive letter to another, for example. If the target can't be resolved, an error message would be displayed. |
ToString |
Returns the shortcut' path as a string.
(Overrides ObjectToString) |
Equality(ShortcutFileInfo, ShortcutFileInfo) | Determines whether the specified ShortcutFileInfo instances are equal. |
(FileInfo to ShortcutFileInfo) | Performs an implicit conversion from FileInfo to ShortcutFileInfo. |
(ShortcutFileInfo to FileInfo) | Performs an implicit conversion from ShortcutFileInfo to FileInfo. |
Inequality(ShortcutFileInfo, ShortcutFileInfo) | Determines whether the specified ShortcutFileInfo instances are not equal. |
CanConvertTo |
Determines whether the source object can be converted to the specified target type.
(Defined by ObjectExtensions) |
CanConvertToT |
Determines whether the source object can be converted to the specified target type.
(Defined by ObjectExtensions) |
ConvertToT |
Converts an object to the specified target type.
If the conversion fails, an exception is thrown.
(Defined by ObjectExtensions) |
ConvertToT |
Converts an object to the specified target type.
If the conversion fails, returns the specified default value.
(Defined by ObjectExtensions) |
GetFileHandle |
Gets a file handle for the specified file or directory.
(Defined by FileSystemInfoExtensions) |
GetShellPropertyValueT |
(Defined by FileSystemInfoExtensions) |
GetUniqueId |
Gets the unique system identifier for the file or directory
pointed by the source FileSystemInfo,
also known as the File Reference Number (FRN).
https://msdn.microsoft.com/en-us/library/windows/desktop/ms646269%28v=vs.85%29.aspx (Defined by FileSystemInfoExtensions) |
IsDisposable |
Determines whether the specified object is a disposable type
(i.e., it implements IDisposable interface).
(Defined by ObjectExtensions) |
Speak |
Speaks the string representation of the source object by using the
operating system integrated text-to-speech synthesizer.
(Defined by ObjectExtensions) |
Speak |
Speaks the string representation of the source object by using the
operating system integrated text-to-speech synthesizer.
(Defined by ObjectExtensions) |
ThrowIfNullTException |
Throws the specified exception if the source object is null.
(Defined by ObjectExtensions) |
ToShellItem |
Converts the source FileSystemInfo to IShellItem.
(Defined by FileSystemInfoExtensions) |
ToShellObject |
Converts the specified FileSystemInfo to ShellObject.
(Defined by FileSystemInfoExtensions) |