BUG: Testing to See if the Current Form is "Me" Always Returns False

ID: Q215391


The information in this article applies to:
  • Microsoft Windows CE Toolkit for Visual Basic 6.0, version 1.0
  • Microsoft Windows CE Toolkit for Visual Basic 5.0, version 1.0


SYMPTOMS

When testing to see if the current form is "Me" always returns False in a Windows CE Toolkit for Visual Basic (VBCE) project, the expectation is that this should always return True.


RESOLUTION

The workaround for this is to compare the Caption properties of Me and Form1.


STATUS

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


MORE INFORMATION

Steps to Reproduce Behavior

  1. Start a new Windows CE HPC Project in Visual Basic. Form1 is created by default.


  2. Add a command button to Form1.


  3. Paste the following code into Form1:


  4. 
    Option Explicit
    
    Public Sub Test(frm)
        MsgBox "Form1 is frm = " & (Form1 Is frm)
    End Sub
    
    Private Sub Command1_Click()
        Test Me
        Test Form1
    End Sub 
  5. Run the project and target either emulation or the remote device.


Additional query words: vbce vbce5 vbce6 wce

Keywords : kbToolkit kbVBp500bug kbVBp600bug kbWinCE kbGrpVB kbDSupport
Version : WINDOWS:1.0
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: September 1, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.