Error when trying to run code

Dec 18, 2009 at 1:54 PM

When trying to run the sample vb code I get the following error at MainForm.vb...Sub CreateJumplist...line jl.refresh.  Not sure what needs to be turned on.

 

System.UnauthorizedAccessException was unhandled
  Message="Custom categories cannot be added while recent documents tracking is turned off."
  Source="Microsoft.WindowsAPICodePack.Shell"
  StackTrace:
       at Microsoft.WindowsAPICodePack.Taskbar.JumpList.AppendCustomCategories()
       at Microsoft.WindowsAPICodePack.Taskbar.JumpList.Refresh()
       at Windows7Jumplist.MainForm.CreateJumpList() in C:\Development\VB\VB Code\vb.net8 Samples\Jumplist Sample\Windows7Jumplist\MainForm.vb:line 80
       at Windows7Jumplist.MainForm.MainForm_Shown(Object sender, EventArgs e) in C:\Development\VB\VB Code\vb.net8 Samples\Jumplist Sample\Windows7Jumplist\MainForm.vb:line 18
       at System.Windows.Forms.Form.OnShown(EventArgs e)
       at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
       at System.Threading.ExecutionContext.runTryCode(Object userData)
       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
       at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
       at System.Windows.Forms.Control.WndProc(Message& m)
       at Windows7Jumplist.MainForm.WndProc(Message& m) in C:\Development\VB\VB Code\vb.net8 Samples\Jumplist Sample\Windows7Jumplist\MainForm.vb:line 38
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at Windows7Jumplist.Program.Main() in C:\Development\VB\VB Code\vb.net8 Samples\Jumplist Sample\Windows7Jumplist\Program.vb:line 21
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException:

Oct 20, 2010 at 11:58 PM

This happens because Start storage of recently opened items is turned off.

Right-click Start Button
Select Properties
Select Start Menu Tab
In Privacy Group check "Store and display recently opened items in the Start menu and the taskbar"