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:
STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section. This problem was first corrected in the Microsoft .NET Framework 1.0 Service Pack 3.
MORE INFORMATION
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.
- In the Properties window, set the DropDownStyle property to Simple.
- In Solution Explorer, right-click the Form1.vb file, and then click View Code.
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("Hi") End Sub
- On the Build menu, click Build Solution.
- On the Debug menu, click Start. Form1 appears.
- Select ComboBox1, and then press PAGE UP.
You will notice the behavior that is mentioned in the "Symptoms" 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