Support
Joined: 18 Jul 2005 Posts: 731
|
Posted: Thu May 08, 2008 11:30 am Post subject: HOWTO: Determine whether a item is a 'special' folder such as the Control Panel, My Network Places, etc |
|
|
Special folders are folders such as My Computer, Control Panel, My Network Places, My Documents, Windows directory, etc. See the SpecialFolders enumeration for a complete list of special folders.
Use the IsSpecialFolder method of ListItem class to determine whether a listitem is a 'special' item. For example, to determine whether an item is the 'Control Panel' , use the following code :
[C#]
if( fileView.FirstSelectedItem.IsSpecialFolder(LogicNP.FileViewControl.SpecialFolders.CONTROLS))
MessageBox.Show( "Selected node is the 'Control Panel' node");
[VB]
If (fileView.FirstSelectedItem.IsSpecialFolder(LogicNP.FileViewControl.SpecialFolders.CONTROLS)) Then
MessageBox.Show( "Selected item is the 'Control Panel' ")
End If |
|