Microsoft.Win32 Namespace

Microsoft.Win32 命名空间提供两种类型的类:处理由操作系统引发的事件的类和操作系统注册表的类。 The Microsoft.Win32 namespace provides two types of classes: those that handle events raised by the operating system and those that manipulate the system registry.

CommonDialog

用于显示常用 Win32 对话框的抽象基类。An abstract base class for displaying common Win32 dialogs.

FileDialog

一个抽象基类,用于封装文件对话框(包括 OpenFileDialogSaveFileDialog)的通用功能。An abstract base class that encapsulates functionality that is common to file dialogs, including OpenFileDialog and SaveFileDialog.

FileDialogCustomPlace

表示 FileDialog 自定义空间列表中的项。Represents an entry in a FileDialog custom place list.

FileDialogCustomPlaces

为文件对话框中的自定义空间定义已知文件夹。Defines the known folders for custom places in file dialog boxes.

IntranetZoneCredentialPolicy

定义凭据策略,该凭据策略将用于使用 WebRequest 及其派生类发出的资源请求。Defines a credential policy to be used for resource requests that are made using WebRequest and its derived classes.

OpenFileDialog

表示一个通用对话框,用户可以使用此对话框来指定一个或多个要打开的文件的文件名。Represents a common dialog box that allows a user to specify a filename for one or more files to open.

PowerModeChangedEventArgs

PowerModeChanged 事件提供数据。Provides data for the PowerModeChanged event.

Registry

提供表示 Windows 注册表中的根项的 RegistryKey 对象,并提供访问项/值对的 static 方法。Provides RegistryKey objects that represent the root keys in the Windows registry, and static methods to access key/value pairs.

RegistryAclExtensions
RegistryKey

表示 Windows 注册表中的项级节点。Represents a key-level node in the Windows registry. 此类是注册表封装。This class is a registry encapsulation.

SaveFileDialog

表示一个通用对话框,用户可以使用此对话框来指定一个要将文件另存为的文件名。Represents a common dialog that allows the user to specify a filename to save a file as. 在部分信任情况下执行的应用程序不能使用 SaveFileDialogSaveFileDialog cannot be used by an application that is executing under partial trust.

SessionEndedEventArgs

SessionEnded 事件提供数据。Provides data for the SessionEnded event.

SessionEndingEventArgs

SessionEnding 事件提供数据。Provides data for the SessionEnding event.

SessionSwitchEventArgs

SessionSwitch 事件提供数据。Provides data for the SessionSwitch event.

SystemEvents

提供对系统事件通知的访问。Provides access to system event notifications. 此类不能被继承。This class cannot be inherited.

TimerElapsedEventArgs

TimerElapsed 事件提供数据。Provides data for the TimerElapsed event.

UserPreferenceChangedEventArgs

UserPreferenceChanged 事件提供数据。Provides data for the UserPreferenceChanged event.

UserPreferenceChangingEventArgs

UserPreferenceChanging 事件提供数据。Provides data for the UserPreferenceChanging event.

枚举

PowerModes

为操作系统报告的电源模式事件定义标识符。Defines identifiers for power mode events reported by the operating system.

RegistryHive

表示外部计算机上的顶级节点的可能值。Represents the possible values for a top-level node on a foreign machine.

RegistryKeyPermissionCheck

指定在打开注册表项并访问它们的名称/值对时是否执行安全检查。Specifies whether security checks are performed when opening registry keys and accessing their name/value pairs.

RegistryOptions

指定在创建注册表项时使用的选项。Specifies options to use when creating a registry key.

RegistryValueKind

指定在注册表中存储值时所用的数据类型,或标识注册表中某个值的数据类型。Specifies the data types to use when storing values in the registry, or identifies the data type of a value in the registry.

RegistryValueOptions

指定从注册表项检索名称/值对时的可选行为。Specifies optional behavior when retrieving name/value pairs from a registry key.

RegistryView

指定要在 64 位操作系统上针对的注册表视图。Specifies which registry view to target on a 64-bit operating system.

SessionEndReasons

定义表示当前登录会话的结束方式的标识符。Defines identifiers that represent how the current logon session is ending.

SessionSwitchReason

定义用于表示会话切换事件类型的标识符。Defines identifiers used to represent the type of a session switch event.

UserPreferenceCategory

定义表示用户首选项类别的标识符。Defines identifiers that represent categories of user preferences.

委托

PowerModeChangedEventHandler

表示用来处理 PowerModeChanged 事件的方法。Represents the method that will handle the PowerModeChanged event.

SessionEndedEventHandler

表示用来处理 SessionEnded 事件的方法。Represents the method that will handle the SessionEnded event.

SessionEndingEventHandler

表示将处理来自操作系统的 SessionEnding 事件的方法。Represents the method that will handle the SessionEnding event from the operating system.

SessionSwitchEventHandler

表示用来处理 SessionSwitch 事件的方法。Represents the method that will handle the SessionSwitch event.

TimerElapsedEventHandler

表示用来处理 TimerElapsed 事件的方法。Represents the method that will handle the TimerElapsed event.

UserPreferenceChangedEventHandler

表示用来处理 UserPreferenceChanged 事件的方法。Represents the method that will handle the UserPreferenceChanged event.

UserPreferenceChangingEventHandler

表示用来处理 UserPreferenceChanging 事件的方法。Represents the method that will handle the UserPreferenceChanging event.