Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))

Desktop Property

Location

My.Computer.FileSystem.SpecialDirectories.Desktop

Syntax

Dim result As String = My.Computer.FileSystem. _ SpecialDirectories.Desktop

Description

The Desktop property returns the full path name to the Desktop folder for the current user on the local workstation. Usually, this directory is found at C:\Documents and Settings\user\Desktop, but it may vary from system to system.

Usage at a Glance

  • This property is read-only.

  • This folder contains items that appear on the user's Windows desktop.

  • This path may not be defined in some cases. In such cases, use of this property generates an exception.

  • The returned path will never have a backslash "\" character at the end.

Related Framework Entries

  • Microsoft.VisualBasic.MyServices.SpecialDirectoriesProxy.Desktop Property

  • Microsoft.VisualBasic.FileIO.SpecialDirectories.Desktop Property

See Also

AllUsersApplicationData Property, CurrentUserApplicationData Property, MyDocuments Property, MyMusic Property, MyPictures Property, ProgramFiles Property, Programs Property, SpecialDirectories Object, Temp Property

Категории