Microsoft KB Archive/215403

= BUG: VBCE Design Time HelpContextID Not Persisted at Run Time =

Article ID: 215403

Article Last Modified on 8/19/2005

-

APPLIES TO


 * Microsoft Windows CE Toolkit for Visual Basic 6.0

-



This article was previously published under Q215403



SYMPTOMS
After setting the HelpContextID property at design time on controls that ship with the ActiveX Control Pack, the property returns 0 when read at run time. This behavior occurs when the application is run on the remote device and in the emulator.



RESOLUTION
If the HelpContextID property is set at run time, it returns the correct value when it is read.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.



MORE INFORMATION
This behavior only occurs in the Windows CE Platform. The following controls exhibit this behavior: Grid, ListView, PictureBox, TabStrip, and TreeView.

Steps to Reproduce Behavior
 Create a new Windows CE Project in Visual Basic. Form1 is created by default. From the Project menu, choose Components, and then add the Microsoft CE PictureBox Control 6.0 to the project. Add a PictureBox control to Form1. In the Properties window, set the HelpContextID property of PictureBox1 to 1.  Add the following code behind Form1: Private Sub Form_Activate ' Uncommenting the following line of code will allow the ' HelpContextID property to return the expected value ' PictureBox1.HelpContextID = 1 MsgBox "Expected = 1" & vbCrLf & "Actual = " & PictureBox1.HelpContextID End Sub  Press the F5 key to run the program. Note that the expected and actual values differ.</li></ol>

After uncommenting the line of code in the preceding sample that sets the HelpContextID property and running the application again, the expected and actual values are identical.

<div class="references_section">