Hello Frank,
You can tell the version of NetCF running on the device or emulator by
using the Cgacutil program. See this entry in the FAQ for details:
http://msdn.microsoft.com/mobility/p.../faq/default.a
spx#1.26
You can get SP2 installed on the emulator by copying the X86 SP2 CAB file
to the emulator and exploding it there. We unfortunately don't have a
supported solution for updating Visual Studio .NET 2003 so that SP2 is used
during F5 deployment. (There may be ways to achieve this, but they leave
the VS product in an unknown state with respect to setup.) One technique
you can use to get the right CAB to the device is to place it on a web site
and browse to the CAB file on the emulator in Pocket IE.
As to your point #2 below, you are correct that the workaround for pre-SP2
builds is to set the SelectedNode to null (or Nothing) before clearing the
TreeView control.
--Joe
--
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| From: "Frank Lamers" <nomail>
| Subject: Re: Bug in TreeView
| Date: Thu, 26 Feb 2004 11:10:58 +0100
|
| I have applied SP2 and it seemed to be successful. But the problem still
| exists.
| How do I check the version of the CF on the device?
| And how do I apply the SP to the emulator of VisualStudio?
|
| I made some more tests and encircled the problem a little bit.
|
| 1.
| If you call Treeview.Nodes.Clear the Treeview is cleared, but the Property
| SelectedNode is set to the former last (!) node (which now is not anymore
| part of the treeview). The Fullpath of the SelectedNode shows a message
that
| there was an System.Exception.
|
| 2. After you called Clear you cannot set the SelectedNode to nothing (or
any
| other of nthe former nodes)! If you add new nodes to the TreeView, then
you
| can set SelectedNode to these. To workaround this bug you have to set
| SelectedNode to nothing BEFORE you clear all nodes.
|
| I used .NET CF with applied SP2 and programmed in VB.NET
|
| Sample code: (create a treeview first)
| Dim tn As TreeNode
| tn = TreeView1.Nodes.Add("Newnode")
| TreeView1.SelectedNode = tn
| TreeView1.Nodes.Clear()
| '!!! Treeview1.SelectedNode is still pointing to a treenode
| MsgBox("SelectedNode:" & TreeView1.SelectedNode.Text)
| 'Set to nothing manually fails
| TreeView1.SelectedNode = Nothing
| If TreeView1.SelectedNode Is Nothing Then
| MsgBox("manually set to nothing")
| Else
| MsgBox("!!! cannot set to nothing")
| End If
|
| --Frank
|
|
| "David So [MSFT]" <(E-Mail Removed)> wrote in message
| news:yybXUkA$(E-Mail Removed)...
| > This is a know bug in NetCF v1 and it is fixed in v2. The cause is
because
| > treeview is caching the selected node. Unfortunately, the selected node
| can
| > change without the treeview notifying the selectednode, the work around
| > would be to set the treeview.SelectedNode to Null whenever you call
| > treeView.Nodes.Clear()
| >
| > David
| > This posting is provided "AS IS" with no warranties, and confers no
| rights.
| >
| >
|
|
|