TreeView
Posted by anirudhsaraf on February 8, 2009
This blog has been quiet for a while now as I have been ( am) extremely busy at College. I did however get a chance to make some changes to TreeView. I have been using it for a while now without any trouble so I thought I’ll post it up ( link at bottom).

TreeView
As the above Screenshot shows, it has undergone a few enhancements.
Some Added Features
Favorite Folders : You can now create as many favorite folders as you wish. Use it to create alternate views of your notes.
Make Root ( The up arrow button): Allows you to select any node and make it the topmost element in the TreeView. Specially useful if you are working within a single notebook and section and want to get rid of all the other noise.
Find Page in Tree : Are you on a particular page in OneNote and wish to locate it in the TreeView. This funky two page button will do just that.
Refresh : Refreshes the content of the TreeView to reflect the current hierarchy of OneNote.
Note : This is a standalone executable. There is no installation and it does not run from OneNote. Consequently, it does not make any changes to your system.
Feedback will be appreciated !
Update: Rev 1- Fixed Bug with TreeView Crashing if pages contained tags. If you had problems when TreeView crashed on startup, try the new copy. Thanks John for bringing it to notice !
TreeView : Beta « Tablet PC - A Student’s Perspective said
[...] TreeView [...]
chandra said
sorry there is some error with your exe. I am unable to run it
chandra
anirudhsaraf said
What kind of error are you getting? Do you have the latest .NET framework installed.
John Richardson said
I too cannot run the executable. A dialog box simply opens saying “TreeView has stopped working”.
I am running Windows Vista Ultimate 64bit, with the .NET framework 3.5 (with service pack).
Best wishes,
John
anirudhsaraf said
This sometimes happen if you are already have OneNote running , and you run TreeView as an admin. Run OneNote and TreeView with the same privilege level. Let me know if that helps.
Thanks,
Ani
John Richardson said
Thanks for the tip. This wasn’t the problem.
By closing notebooks, I got Treeview working, and by re-opening notebooks and moving sections and pages, I isolated the crash to an individual page. Even with all content removed from the page, it causes the crash, which if reproduced when TreeView is already running, gives the error message:
“Unhandled exception has occurred in your application….”
“Cannot find column [ID]”
If you e-mail me, I can send you the (small) file containing the section and page which causes the problem.
Unfortunately, the problem also occurs in a couple of other big notebooks, and there is no way of isolating the pages except by trial and error. However, having got Treeview working, it is exactly what I need to help me navigate (and organise with favourites), my notebooks.
So many thanks, and good luck tracking down the bug!
Best wishes,
John
–
Full error message:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.Data.EvaluateException: Cannot find column [ID].
at System.Data.NameNode.Bind(DataTable table, List`1 list)
at System.Data.BinaryNode.Bind(DataTable table, List`1 list)
at System.Data.DataExpression.Bind(DataTable table)
at System.Data.Select..ctor(DataTable table, String filterExpression, String sort, DataViewRowState recordStates)
at System.Data.DataTable.Select(String filterExpression)
at TreeView4.DataManager.GetNodeType(String ID)
at TreeView4.DataManager.GetNodeChildren(String ID)
at TreeView4.DataManager.GetNodeChildren(RootNodes specialID)
at TreeView4.DisplayTreeView.LoadTree(Presenter setPresenter)
at TreeView4.Presenter.RefreshViewButtonClicked()
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
—————————————-
TreeView
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/John/Desktop/TreeView.exe
—————————————-
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
—————————————-
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
—————————————-
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
—————————————-
System.Deployment
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Deployment/2.0.0.0__b03f5f7f11d50a3a/System.Deployment.dll
—————————————-
Microsoft.Office.Interop.OneNote
Assembly Version: 12.0.0.0
Win32 Version: 12.0.4518.1014
CodeBase: file:///C:/Windows/assembly/GAC/Microsoft.Office.Interop.OneNote/12.0.0.0__71e9bce111e9429c/Microsoft.Office.Interop.OneNote.dll
—————————————-
System.Data
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/Windows/assembly/GAC_64/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
—————————————-
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
—————————————-
System.Core
Assembly Version: 3.5.0.0
Win32 Version: 3.5.30729.1 built by: SP
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll
—————————————-
Accessibility
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
—————————————-
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
anirudhsaraf said
Hi John,
Thanks a lot for the feedback. It would be great if you could send me the section with the offending page. My email is anirudhsaraf@gmail.com
Thanks !
Ani
John Richardson said
Hi Ani,
Mailed you this last week. Any thoughts?
Best wishes,
John
anirudhsaraf said
Thanks for the Email. That error should now be fixed. Try the new upload and let me know.
Thanks for the feedback !
Ani
John Richardson said
Yeah – that’s working now!
Great work Ani. Many thanks.
John
Luke Banard said
I get this error message when I run the application:
EvenType: cIr2Or3 P1: treeview.exe P2: 1.0.0.0 P3: 49a3710c
P4: treeview P5:1.0.0.0 P6: 49a3710c P7: 7a P8: 1c6
PS: system.io.filenotfoundexception
thanks
Luke.
anirudhsaraf said
Hi Luke, what OS are you running? Does the application not stat up? Can you provide any othe details?
Thanks,
Ani
Luke Banard said
I’m running on Windows Xp 2002 service pack 3 home edition.
It says “TreeView has encounterd a problem and needs to close” when I try to run it. The application does not start up.
Yg said
same problem as Luke here …
bc said
Same problem as Yg and Luke. Windows XP service pack 3 home also.
Pity, what I most dislike about OneNote is the lack of a simple, quick tree view.