Windows CE Toolkit for Visual Basic 6.0 Release Notes

December 1998

Information in this document is subject to change without notice and is provided for informational purposes only. The entire risk of the use or results of the use of this document remains with the user, and Microsoft Corporation makes no warranties, either express or implied. The example companies, organizations, products, people and events depicted herein are fictitious. No association with any real company, organization, product, person or event is intended or should be inferred. Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Microsoft Corporation.

Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property.

Ó 1998 Microsoft Corporation. All rights reserved.

Microsoft, MS, MS-DOS, Visual Basic, Visual C++, Windows, Win32, Windows NT, and Visual Studio are either registered trademarks or trademarks of Microsoft Corporation in the U.S.A. and/or other countries.

The names of actual companies and products mentioned herein may be the trademarks of their respective owners.

Contents

Installation Procedure
Samples
Known Issues

Installation Procedure

You must install Microsoft® Visual Basic® 6.0 before you can install the Microsoft® Windows® CE Toolkit for Visual Basic® 6.0.

    To install the Windows CE Toolkit for Visual Basic 6.0

  1. Install Visual Basic 6.0.
  2. Run Setup.exe from the setup folder on the CD.
  3. Follow the instructions in the setup program.

Note: In order to use the H/PC SDK included with this release, you must install it as part of the VBCE 6.0 install (either Complete or Custom). In addition - you can install it first and then install VBCE 6.0.

To save disk space, you may use the Custom install option during the H/PC SDK installation to un-select the following components not required for VBCE development:

Note: These are required for the Windows CE Toolkit for VC++ 6.0 development.

Samples

The toolkit directory contains a Samples subdirectory, and each sample has its own subdirectory. There is a Readme.txt file for each sample. The following is a listing of the samples included in the toolkit:

Known Issues

The following sections describe the known language-related issues present in the toolkit.

Property Issues

You cannot change the BorderStyle property of a Label control at run time.

Setting font properties on Microsoft Foundation Classes (MFC) controls will not cause the controls to repaint automatically. You must manually cause an MFC control to repaint itself after changing the font properties.

You can highlight items in a ComboBox control with the Locked property set to True. This behavior differs from Visual Basic 6.0 in that setting the Locked property to True does not prevent the items in the ComboBox control from being highlighted.

The Err object does not support the LastDLLError property.

The Value property of a Checkbox control may return an incorrect result inside the control's Click event in cases where the event is generated by changing the Value property directly instead of by choosing the control with a stylus.

If you use a coordinate system for the ScaleMode property other than twips, some properties, such as CurrentX, will differ slightly from their expected values. All coordinates are stored internally as twips, so other coordinate systems may be subject to rounding errors during conversion.

The Appearance property of the CommandButton object has no effect on the appearance of the control.

The design-time settings for the ScaleHeight and ScaleWidth properties of a form are not returned correctly when read at run time. If these two properties are changed during run time, the correct values are returned.

Some intrinsic controls may generate both a KeyDown and KeyPress event in cases where Visual Basic 6.0 generates only the KeyDown event.

If you compile or save a Visual Basic for Windows CE 6.0 project and switch to a Visual Basic 6.0 project, the App.Path property of the Visual Basic 6.0 project defaults to the last path where your Windows CE project or .vb file was saved.

Visual Basic for Windows CE does not save the data in ItemData for combo boxes as it does for list boxes.

The toolkit does not support setting the TabIndex property on controls during Form_Load.

The ClipControls property for the Form object does not affect how controls are drawn.

For the Text property of the ListView control, the Item label text is invisible until ListView is refreshed.

The Comm control ParityReplace property does not use the ParityReplace character when there is a parity mismatch. Additionally, invalid characters are sent when Parity is set to Space.

The Break property of the Comm control suspends communication until it is set to False. This works the opposite way in Visual Basic 6.0, where setting the Break property to True enables you to send and receive data.

For the ListView control, only the first line of a multiline ListItem label is visible until you set the WordWrap property at run time.

For a CommandBar control, setting the Style property of a button to 3 (cbrSeparator) returns zero when the Style property is read.

For a Grid control, if you set the CellFontItalic property to True and then right-align the text, the text will be truncated.

Using the Form1.ActiveControl property during a Form_Activate event raises error 5 (Invalid Procedure Call or Argument).

Do not change the CommandBar Height property. If you attempt to do so at run time, the property value is set to the new height, but the actual CommandBar height does not change. The CommandBar height is determined by the number and size of the controls it contains.

The index parameter of the ListView.ListItems.Add property is ignored. Items are always added to the end of the list.

In the CommonDialog control, if a user chooses a combined path and file name longer than the MaxFileSize property, the control reacts as if the user canceled the dialog box.

The toolkit does not save an ActiveX control’s Enabled property in the project file, so settings for the Enabled property are not maintained across development sessions. To save Enabled property settings, write code to set the Enabled property in Form_Load.

For the ListView control, the LabelWrap property works correctly when you set it at run time. However, if you set the LabelWrap property to False at design time, the label text remains wrapped.

For the TreeView control, using the Key property to access a Node within a collection raises an error 13. To avoid generating an error, use Index instead of Key.

Once the ImageList property of the TabStrip control is specified, all tabs will have an image on them, even if an Image parameter was not specified when the tab was added.

Method Issues

An error occurs if you call the App.End method in a Form_Load event if the Form is invoked by a Module.

For the WaitForEvents method, .pvbload does not exit when used with the App.End method.

App does not exit if you call the WaitForEvents method twice.

An error is not raised if you call the WaitForEvents method from Form code.

A method is issued if you call the WaitForEvents method from a control's event code.

On a Handheld PC (H/PC), Err.Raise does not work unless you call Err.Clear first. However, this does not apply to an H/PC running the Handheld PC Pro Edition software.

When using the File control Get method, you cannot read any binary file written using Microsoft® Visual Basic® 5.0. This is because binary files written using the toolkit contain four additional header bytes at the beginning of the file. To read a binary file using the toolkit, use the Declare statement and CreateFile function to access the file.

The compiler does not test for variable or procedure names that are the same as objects or object properties. This enables you to accidentally override methods such as DrawCircle. Overriding the standard objects and methods is not recommended.

For the TreeView control’s GetVisibleCount method, no partially visible items are included in the count.

Event Issues

Under some circumstances, the Click event of a Label control may be generated twice in a row.

When the drop-down arrow of a ComboBox control is clicked, the following events are generated: GotFocus, LostFocus, GotFocus, DropDown.

You should not use a CommonDialog control in a Form_Load event because other applications may cause the dialog box to disappear. If the dialog box disappears, your application may wait indefinitely for a response from the control with no forms visible and no way for the user to terminate the application.

In the toolkit, the events for the Grid control are generated in a different order from Visual Basic 6.0. The following table shows how Grid events start in Visual Basic and in the toolkit.

Windows CE Toolkit for Visual Basic 6.0
Visual Basic 6.0
LeaveCell LeaveCell
EnterCell SelChange
RowColChange EnterCell
SelChange RowColChange
GridClick GridClick

The LostFocus and GotFocus events are generated when a ListItem label for a TreeView or ListView control is edited. The following table shows the order in which the events are generated.

Control
Events
ListView BeforeLabelEdit
LostFocus
AfterLabelEdit
GotFocus
TreeView BeforeLabelEdit
LostFocus
Got Focus
AfterLabelEdit

When you issue a public function from an unloaded form in Visual Basic 6.0, the function occurs first, then the Form_Load occurs. In Visual Basic for Windows CE, however, the Form_Load event occurs before the function is called.

If you use an accelerator key or the TAB key to navigate to a ComboBox control, the GotFocus event of the control occurs twice.

The Click event for the TabStrip control occurs only when the tab is changed. It does not occur when a user attempts to re-select a selected tab.

Function Issues

The Left function does not work correctly in forms because the Left property of the form overrides the function of the same name. Use the Mid function or call the Left function from a module instead.

The compiler does not check for a valid or unused event prefix for the CreateObjectWithEvents function. Event prefixes must start with an alpha character, and subsequent characters can be either alphanumeric or an underscore. Do not use the same prefix as an existing control.

When using the CreateObjectWithEvents function, you cannot place event code in a Form file.

If you use the MsgBox function in the Form_Load event, the App form starts as a minimized form.

Constant and Variable Issues

You cannot use a constant to define another constant. All constants must be literals.

It is possible to declare a variable that has the same name as a control. However, you should avoid doing this because such declarations are not detected during compilation and may cause unpredictable results.

Statement Issues

When using the ListView control, you cannot use the Set statement to set the SelectedItem property. The following code example shows the syntax you should use as an alternative.

Form1.ListView1.SelectedItem = AnItem.

The Dim As statement enables any data type in the As clause, even unsupported data types. The As clause is discarded during compilation and is intended only for use with the Intellisense® feature of the IDE.

You cannot use the Set statement when assigning an object to a property. You can use the Set statement only when assigning an object to a variable. Use the standard assignment operator (=) to assign an object to a property.

When using the Declare statement, variant parameters must be passed ByRef (not ByVal). Also the Declare statement functin cannot have a variant return value.

Control, Object, and Collection Issues

When using the Comm control - only the Data Bit settings of 8 and 7 are supported. If you attempt to use a Data Bit setting of 6 or 5 then the characters passed are not valid.

The End, Home, PgUp or PgDn keys cannot be used to navigate around in the Grid Control.

When using the Winsock control, suspending a device with an active TCP connection causes the app on the device to continually raise error 10054 'The connection is reset by remote side' when the device is turned back on.

Images from an Imagelist control used in some controls may appear in black and white rather than in color. This occurs only in the emulator, not on a device.

An MFC control does not use the Activates when visible check box option selected in the MFC control wizard when run on a Visual Basic for Windows CE 6.0 form. When you run the created control on a form, the control always runs as if the Activates when visible option is on.

You cannot create an invisible MFC ActiveX® control at run time.

An ActiveX control with a transparent background does not display on a form with a transparent background. Instead, the control will have a white background.

In the emulator, if a combo box has the focus when the Close button on the CommandBar is chosen, the application will terminate. This happens only under emulation.

Keyboard accelerators work only on the last MenuBar added to a CommandBar.

Intellisense for the File control may suggest parentheses where none is required.

When using a Form object, illegally accessing a constant or variable does not raise an error.

When using the CommandBar control, you can change only the width of the rightmost CommandBar item.

The toolkit sets the order of forms in the Forms collection to the design time order, while Visual Basic 6.0 sets the order of forms to the run-time load order.

With the toolkit, it is possible to assign extremely large or extremely small Form dimensions. Visual Basic 6.0 typically enforces minimum and maximum Form dimensions based on screen resolution and the window style of the form.

If you hide all the menu items on a form, the menu names are hidden, but the black box containing the menus is not. In Visual Basic 6.0, the entire menu area disappears.

To put a bitmap file in a PictureBox, add the bitmap file to the project and specify the name of the bitmap in the Picture property. Note that the picture doesn't show up in design time, only in runtime.

All the controls that have both Height and Width allow values to be assigned to them that are smaller than the lowest possible value, however the controls will ignore any values lower than their minimum.

Project and Module Issues

You cannot refer to module names explicitly. Syntax such as Module1.Function1 will not work. All modules are concatenated during compilation, and the specific module names are not retained.

All Private variables are treated as if they were Public variables.

You cannot build a Visual Basic for Windows CE 6.0 project from the command line because Visual Basic does not load the add-in before it compiles the project.

Do not reset the menus or toolbars while editing a Visual Basic for Windows CE project. This clears the menus, causing a failure when you shut down Visual Basic.

Additional Toolkit Issues

The Data View Window command on the View menu can not be hidden by the add-in and remains visible, though not usable, in a Windows CE project.

Msvbvm and OLE are permanently installed at the top of the Project References and thus override all other references. This behavior causes the IDE for the toolkit to display hints for Visual Basic 6.0 instead of Visual Basic for Windows CE 6.0. To bypass this default behavior, use Dim...As with Windows CE-specific types.

Top-level menu items created with the Menu Editor must have at least one submenu item in Visual Basic for Windows CE 6.0.

If you have a device connected to the IDE or Control Manager, and then you exchange another device for the current one, you do not need to create a new device in the Platform Manager if you use the old device name. As this may change in the future, you should create a separate connection for each device.

Visual Basic 6.0 indicates that certain features are available when they are not. These features include CausesValidation, DragIcon, DragMode, Index, Drag, DragDrop, and Validate; for a complete list, refer to Help. Visual Basic 6.0 uses the type libraries in Msvbvm60.dll and VB6.olb to provide certain default properties and events for objects. Although Visual Basic for Windows CE does not use these libraries, they cannot be removed or disabled in the References dialog box.

When using the emulation environment, if you cancel the download/launch of an VBCE application prior to the emulator starting, it may cause the emulator to fail. Cancelling while connecting to a device may result in VBCE hanging on its connection to the device. Both of these cases are very rare and usually are only experienced if you immediately try to cancel before a connection is established. To avoid this, always allow the inital connection (or emulator) to start before cancelling the download.