FIX: MouseEnter and MouseLeave Don't Get Fired on PictureBox

ID: Q223365


The information in this article applies to:


SYMPTOMS

The mouseEnter and mouseLeave events might not get fired for WFC's PictureBox control.


STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.

This bug was corrected in Visual Studio 6.0 Service Pack 3. For more information about Visual Studio service packs, please see the following articles in the Microsoft Knowledge Base:

Q194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why

Q194295 HOWTO: Tell That Visual Studio 6.0 Service Packs Are Installed


MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a new Windows EXE project in Visual J++ 6.0.


  2. Add a PictureBox control to the Form and set the Image property to a valid image file.


  3. Add two Label controls to the Form just below the PictureBox.


  4. Add the following two member variables to your class:


  5. int i1=0;
    int i2=0; 
  6. Add a mouseEnter EventHandler and place the following code within it:


  7. label1.setText("Entered "+(++i1)+" times."); 
  8. Add a mouseLeave EventHandler and place the following code within it:


  9. label2.setText("Exited "+(++i2)+" times."); 
  10. Run the application and move your mouse in and out of the image area; no updates to the labels' text should occur.


(c) Microsoft Corporation 1999, All Rights Reserved. Contributions by Joseph B. Hall, Microsoft Corporation.

Additional query words:


Keywords          : kbservicepack kbVJ600 kbVJ600bug kbGrpJava kbVS600sp2 kbVS600SP1 kbVS600sp3fix 
Version           : WINDOWS:6.0
Platform          : WINDOWS 
Issue type        : kbbug 

Last Reviewed: May 19, 1999