Microsoft KB Archive/814970

= FIX: The KeyDown event of a Simple style combo box is raised two times when you press the PAGE UP, PAGE DOWN, UP ARROW, or DOWN ARROW key in the .NET Framework 1.0 SP2 =

Article ID: 814970

Article Last Modified on 12/30/2006

-

APPLIES TO


 * Microsoft .NET Framework 1.0 Service Pack 2

-





SYMPTOMS
In a Microsoft Windows application, the KeyDown event of a Simple style combo box is raised two times when you press the PAGE UP, PAGE DOWN, UP ARROW, or DOWN ARROW key. This problem occurs if the following conditions are true for the computer where the application is running:
 * The Microsoft .NET Framework 1.0 is installed.
 * The Microsoft .NET Framework 1.0 Service Pack 2 (SP2) is installed.
 * Hotfix KB812104 is installed.



RESOLUTION
To resolve this problem, obtain the latest service pack for the Microsoft .NET Framework 1.0. To download the latest service pack, visit the following Microsoft Web site:

http://www.microsoft.com/downloads/details.aspx?familyid=6978D761-4A92-4106-A9BC-83E78D4ABC5B&displaylang=en



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section. This problem was first corrected in the Microsoft .NET Framework 1.0 Service Pack 3.



Steps to reproduce the behavior
 Start Microsoft Visual Studio .NET. On the File menu, point to New, and then click Project. The New Project dialog box appears. Under Project Types, click Visual Basic Projects. Under Templates, click Windows Application, and then click OK. By default, a form that is named Form1 is created. Add a ComboBox control to the Form1 form. By default, the ComboBox1 combo box is added to the Form1 form. Right-click ComboBox1, and then click Properties. The Properties window appears.</li> In the Properties window, set the DropDownStyle property to Simple.</li> In Solution Explorer, right-click the Form1.vb file, and then click View Code.</li>  Paste the following code before the End Class statement in the code window of the Form1.vb file. Private Sub ComboBox1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles ComboBox1.KeyDown MessageBox.Show(&quot;Hi&quot;) End Sub </li> On the Build menu, click Build Solution.</li> On the Debug menu, click Start. Form1 appears.</li> Select ComboBox1, and then press PAGE UP.</li></ol>

You will notice the behavior that is mentioned in the &quot;Symptoms&quot; section.

Note The message box appears two times. This behavior indicates that the KeyDown event is raised two times.

For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

824684 Description of the standard terminology that is used to describe Microsoft software updates

Keywords: kbnetframe100presp3fix kbcombobox kbevent kbqfe kbfix KB814970

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.