Skip to main content

VisDriveListBox

Namespace: PPJ.Runtime.Vis

Assembly: PPJ.Runtime.Vis.50 (5.0.0.0)

Displays logical drives in a list box.

public class VisDriveListBox : VisListBoxBase

Example:

using (var list = new PPJ.Runtime.Vis.VisDriveListBox())
{
list.Populate();
}

Constructors

Instance member VisDriveListBox()

Initializes the drive list box and its default behavior.

Methods

Static member FromHandle(handle)

Resolves this control type from a native window handle.

ParameterTypeDescription
handleSalWindowHandleThe native control handle.

Returns: VisDriveListBox. The associated VisDriveListBox, or null when no managed control owns the handle.

A handle belonging to a different managed control type causes an InvalidCastException.

Instance member GetDrive(nIndex)

Extracts a drive path from an item caption.

ParameterTypeDescription
nIndexSalNumberThe zero-based item index.

Returns: SalString. The caption through its first directory separator, or the entire caption when no separator occurs.

Instance member GetDriveType(nIndex)

Reads the drive-type value associated with an item.

ParameterTypeDescription
nIndexSalNumberThe zero-based item index.

Returns: SalNumber. The stored Visual Toolchest drive-type code.

Instance member GetSelectedDrive()

Gets the drive path of the selected item.

Returns: SalString. The selected drive path, or an empty string if no item is selected.

Instance member Populate()

Replaces the items with logical drives and selects the current drive.

Returns: SalNumber. The number of items in the populated list.

Implements

NameDescription
ISalControl
ISalListControl
ISalWindow