BeforeCollapse not available

Hi,

I'm writing an application for Pocket PC, using Visual Studio 2005. On the web I found code to implement a folderbrowser for my application. Now I would like to add some things and therefore I need to put some code in the BeforeCollapse method.

In the msdn this method is mentioned as a part of TreeView. BeforeCollapse should be supported in compact framework 2.0. When I write some code to be executed in this method, I get errors which tell me that BeforeCollapse is not a method of TreeView.

At first I thought maybe for some reason I was working with an old version of compact framework, because the BeforeExpand method did work and also is supported in version 1.0. I checked my installed software and version 2.0 of compact framework is listed.

Can anyone tell me why this method is unavailable for me

Thx


Answer this question

BeforeCollapse not available

  • Cyberjunkie

    Thx Ilya,

    I found the menu-item 'Update project' in the project-menu. After this update everything went well.  I'm a bit amazed Visual Studio doesn't  use NETCF V2 by default.  Is there any reason for this

    Now I wondered if my next projects will use NETCF V2 by default, or do will I have to upgrade them like I did this time If they won't be using V2 by default, can I configure them somewhere to do so

  • baderboy51

    VS 2005 does not have "defaults"; it would create project of whatever type you’ve selected upon creation of the project. You must have chosen V1 project type, these projects have (1.0) in the title. If you’d like V2 projects, simply choose project types without (1.0).

    Also, if your project was upgraded from VS 2003, it would retain its original framework version (V1) unless V1 project type is not available for particular platform in VS 2005.

    For example, VS03/PPC03 project would become NETCF V1 project in VS 2005, but VS03/WindowsCE project would be automatically promoted to V2.



  • Joe Simmonds

    VS 2005 supports development for both NETCF V2 and NETCF V1, so you can indeed be working with NETCF V1. You can check version in project properties. There's also upgrade option in the menu.



  • BeforeCollapse not available