[This is preliminary documentation and is subject to change.]

Gets or sets access key (access character for the button)

Namespace: Tools.WindowsT.IndependentT
Assembly: Tools.Windows (in Tools.Windows.dll) Version: 1.5.3.38916 (1.5.3.38916)

Syntax

C#
[DefaultValueAttribute('')]
[KnownCategoryAttribute(KnownCategoryAttribute..::..KnownCategories.Behavior)]
public char AccessKey { get; set; }
Visual Basic
<DefaultValueAttribute(""C)> _
<KnownCategoryAttribute(KnownCategoryAttribute..::..KnownCategories.Behavior)> _
Public Property AccessKey As Char
	Get
	Set
Visual C++
[DefaultValueAttribute(L'')]
[KnownCategoryAttribute(KnownCategoryAttribute..::..KnownCategories::Behavior)]
public:
property wchar_t AccessKey {
	wchar_t get ();
	void set (wchar_t value);
}
F#
[<DefaultValueAttribute('')>]
[<KnownCategoryAttribute(KnownCategoryAttribute..::..KnownCategories.Behavior)>]
member AccessKey : char with get, set
JScript
function get AccessKey () : char
function set AccessKey (value : char)

Field Value

Should be one of letters contained in Text, otherwise it is not guaranted that accesskey will work.

Remarks

As MessageBox is underlaying-technology independent, mnemonics for accesskeys (such as & in WinForms and _ in WPF) should not be used. You should rather use this property. When you do not want to use accesskey for your button, set his property to 0 (null char, vbNullChar).

See Also