16 instantiations of KeyPressEventArgs
System.Windows.Forms (2)
System\Windows\Forms\Control.cs (2)
8860kpe = new KeyPressEventArgs((char)(int)m.WParamInternal); 8872kpe = new KeyPressEventArgs((char)(int)m.WParamInternal);
System.Windows.Forms.Tests (13)
System\Windows\Forms\KeyPressEventArgsTests.cs (3)
14KeyPressEventArgs e = new(keyChar); 24KeyPressEventArgs e = new('b') 36KeyPressEventArgs e = new('a')
System\Windows\Forms\LabelTests.cs (1)
793KeyPressEventArgs keyPressEventArgs = new KeyPressEventArgs('A');
System\Windows\Forms\ToolStripControlHostTests.cs (1)
4068c.OnKeyPress(new KeyPressEventArgs('a'));
System\Windows\Forms\TreeViewTests.cs (6)
5850yield return new object[] { true, new KeyPressEventArgs('\0'), true }; 5851yield return new object[] { true, new KeyPressEventArgs('a'), true }; 5852yield return new object[] { true, new KeyPressEventArgs(' '), true }; 5854yield return new object[] { false, new KeyPressEventArgs('\0'), false }; 5855yield return new object[] { false, new KeyPressEventArgs('a'), false }; 5856yield return new object[] { false, new KeyPressEventArgs(' '), true };
System\Windows\Forms\UpDownBaseTests.cs (2)
2430yield return new object[] { null, new KeyPressEventArgs('a') }; 2431yield return new object[] { null, new KeyPressEventArgs('a') };
System.Windows.Forms.TestUtilities (1)
CommonTestHelperEx.cs (1)
134new('1')
62 references to KeyPressEventArgs
System.Windows.Forms (23)
System\Windows\Forms\Control.cs (3)
7645protected virtual void OnKeyPress(KeyPressEventArgs e) 8836/// appropriate key events for the message by calling the <see cref="OnKeyPress(KeyPressEventArgs)"/>, 8845KeyPressEventArgs? kpe = null;
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (1)
2463protected override void OnKeyPress(KeyPressEventArgs e)
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (1)
15732protected override void OnKeyPress(KeyPressEventArgs e)
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (4)
2503protected virtual bool KeyPressUnsharesRow(KeyPressEventArgs e, int rowIndex) => false; 2505internal bool KeyPressUnsharesRowInternal(KeyPressEventArgs e, int rowIndex) => 2881internal void OnKeyPressInternal(KeyPressEventArgs e, int rowIndex) => 2884protected virtual void OnKeyPress(KeyPressEventArgs e, int rowIndex)
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.cs (1)
775protected override void OnKeyPress(KeyPressEventArgs e)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (2)
2513private void OnEditKeyPress(object? sender, KeyPressEventArgs e) 2933protected override void OnKeyPress(KeyPressEventArgs e)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.GridViewTextBox.cs (1)
153protected override void OnKeyPress(KeyPressEventArgs e)
System\Windows\Forms\Controls\TextBox\MaskedTextBox.cs (1)
1956protected override void OnKeyPress(KeyPressEventArgs e)
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.cs (2)
512private void HandleKeyPress(object? sender, KeyPressEventArgs e) => OnKeyPress(e); 634protected virtual void OnKeyPress(KeyPressEventArgs e) => RaiseKeyPressEvent(s_keyPressEvent, e);
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (1)
3075internal void RaiseKeyPressEvent(object key, KeyPressEventArgs e) => ((KeyPressEventHandler?)Events[key])?.Invoke(this, e);
System\Windows\Forms\Controls\TreeView\TreeView.cs (1)
2297protected override void OnKeyPress(KeyPressEventArgs e)
System\Windows\Forms\Controls\UpDown\DomainUpDown.cs (1)
335protected override void OnTextBoxKeyPress(object? source, KeyPressEventArgs e)
System\Windows\Forms\Controls\UpDown\NumericUpDown.cs (1)
450protected override void OnTextBoxKeyPress(object? source, KeyPressEventArgs e)
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (1)
622protected virtual void OnTextBoxKeyPress(object? source, KeyPressEventArgs e)
System\Windows\Forms\Input\KeyPressEventArgs.cs (1)
12/// Initializes a new instance of the <see cref="KeyPressEventArgs"/> class.
System\Windows\Forms\Input\KeyPressEventHandler.cs (1)
10public delegate void KeyPressEventHandler(object? sender, KeyPressEventArgs e);
System.Windows.Forms.Design (2)
System\ComponentModel\Design\ObjectSelectorEditor.Selector.cs (1)
115protected override void OnKeyPress(KeyPressEventArgs e)
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (1)
1044private void selectedColumns_KeyPress(object? sender, KeyPressEventArgs e)
System.Windows.Forms.Tests (35)
System\Windows\Forms\ComboBoxTests.cs (1)
2914public new void OnKeyPress(KeyPressEventArgs e) => base.OnKeyPress(e);
System\Windows\Forms\ControlTests.cs (1)
1304public new void OnKeyPress(KeyPressEventArgs e) => base.OnKeyPress(e);
System\Windows\Forms\ControlTests.Handlers.cs (1)
3018public void Control_OnKeyPress_Invoke_CallsKeyPress(KeyPressEventArgs eventArgs)
System\Windows\Forms\DataGridViewCellTests.cs (3)
5777public void DataGridViewCell_OnKeyPress_Invoke_Nop(KeyPressEventArgs e) 6595public new bool KeyPressUnsharesRow(KeyPressEventArgs e, int rowIndex) => base.KeyPressUnsharesRow(e, rowIndex); 6629public new void OnKeyPress(KeyPressEventArgs e, int rowIndex) => base.OnKeyPress(e, rowIndex);
System\Windows\Forms\DomainUpDownTests.cs (1)
1554public new void OnTextBoxKeyPress(object source, KeyPressEventArgs e) => base.OnTextBoxKeyPress(source, e);
System\Windows\Forms\GroupBoxTests.cs (2)
1607public void GroupBox_OnKeyPress_Invoke_CallsKeyPress(KeyPressEventArgs eventArgs) 2365public new void OnKeyPress(KeyPressEventArgs e) => base.OnKeyPress(e);
System\Windows\Forms\KeyPressEventArgsTests.cs (3)
14KeyPressEventArgs e = new(keyChar); 24KeyPressEventArgs e = new('b') 36KeyPressEventArgs e = new('a')
System\Windows\Forms\LabelTests.cs (2)
793KeyPressEventArgs keyPressEventArgs = new KeyPressEventArgs('A'); 953public new void OnKeyPress(KeyPressEventArgs e) => base.OnKeyPress(e);
System\Windows\Forms\PanelTests.cs (2)
914public void Panel_OnKeyPress_Invoke_CallsKeyPress(KeyPressEventArgs eventArgs) 1228public new void OnKeyPress(KeyPressEventArgs e) => base.OnKeyPress(e);
System\Windows\Forms\PictureBoxTests.cs (2)
2327public void PictureBox_OnKeyPress_Invoke_CallsKeyPress(KeyPressEventArgs eventArgs) 2908public new void OnKeyPress(KeyPressEventArgs e) => base.OnKeyPress(e);
System\Windows\Forms\ProgressBarTests.cs (2)
2250public void ProgressBar_OnKeyPress_Invoke_CallsKeyPress(KeyPressEventArgs eventArgs) 2662public new void OnKeyPress(KeyPressEventArgs e) => base.OnKeyPress(e);
System\Windows\Forms\PropertyGridTests.cs (3)
3647public void PropertyGrid_OnKeyPress_Invoke_CallsKeyPress(KeyPressEventArgs eventArgs) 3652void handler(object sender, KeyPressEventArgs e) 4235public new void OnKeyPress(KeyPressEventArgs e) => base.OnKeyPress(e);
System\Windows\Forms\SplitterTests.cs (2)
1859public void Splitter_OnKeyPress_Invoke_CallsKeyPress(KeyPressEventArgs eventArgs) 2371public new void OnKeyPress(KeyPressEventArgs e) => base.OnKeyPress(e);
System\Windows\Forms\ToolStripControlHostTests.cs (4)
2897public void ToolStripControlHost_OnKeyPress_Invoke_CallsKeyPress(KeyPressEventArgs eventArgs) 3556public void ToolStripControlHost_OnSubscribeControlEvents_InvokeKeyPress_Success(KeyPressEventArgs eventArgs) 4590public new void OnKeyPress(KeyPressEventArgs e) => base.OnKeyPress(e); 4679public new void OnKeyPress(KeyPressEventArgs e) => base.OnKeyPress(e);
System\Windows\Forms\ToolStripDropDownTests.cs (2)
4086public void ToolStripDropDown_OnKeyPress_Invoke_CallsKeyPress(KeyPressEventArgs eventArgs) 5206public new void OnKeyPress(KeyPressEventArgs e) => base.OnKeyPress(e);
System\Windows\Forms\TreeViewTests.cs (2)
5861public void TreeView_OnKeyPress_Invoke_CallsKeyPress(bool handled, KeyPressEventArgs eventArgs, bool expectedHandled) 7656public new void OnKeyPress(KeyPressEventArgs e) => base.OnKeyPress(e);
System\Windows\Forms\UpDownBaseTests.cs (2)
2436public void UpPressBase_OnTextBoxKeyPress_Invoke_CallsKeyPress(object source, KeyPressEventArgs eventArgs) 3216public new void OnTextBoxKeyPress(object source, KeyPressEventArgs e) => base.OnTextBoxKeyPress(source, e);
System.Windows.Forms.TestUtilities (2)
CommonTestHelperEx.cs (2)
129public static TheoryData<KeyPressEventArgs> GetKeyPressEventArgsTheoryData() 131TheoryData<KeyPressEventArgs> data = new()