Developing for Windows7 with the APICodepack

2,045 views

Published on

Slides used to accompany my presentation given at DevEvening on developing for Windows7 using the WindowsAPICodePack.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,045
On SlideShare
0
From Embeds
0
Number of Embeds
34
Actions
Shares
0
Downloads
8
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Developing for Windows7 with the APICodepack

  1. 1. Developing for Windows 7<br />matt lacey<br />@mrlacey - mrlacey.co.uk<br />
  2. 2.
  3. 3.
  4. 4. Will be looking at:<br />Taskbar Overlay Images & Progress<br />Jump Lists<br />Thumbnail Preview<br />Explorer Browser<br />Known Folders & Stock Icons<br />Command Links<br />Application Restore and Recovery<br />
  5. 5. Not looking at:<br />Touch <br />Ink<br />Sensors<br />DirectX<br />IE8<br />Logo testing<br />
  6. 6.
  7. 7.
  8. 8.
  9. 9. CODE!<br />
  10. 10. Taskbar Overlay Images<br />if (TaskbarManager.IsPlatformSupported)<br />{<br />TaskbarManager.Instance.SetOverlayIcon(<br />this.Handle, icon, &quot;AltText&quot;);<br />}<br />
  11. 11. Taskbar Progress Bar<br />if (TaskbarManager.IsPlatformSupported)<br />{<br />TaskbarManager.Instance.SetProgressValue(<br />value, maximum);<br />TaskbarManager.Instance.SetProgressState(<br />TaskbarProgressBarState.Normal);<br />}<br />
  12. 12. Taskbar JumpLists<br />if (TaskbarManager.IsPlatformSupported)<br />{<br />JumpListjumplist = JumpList.CreateJumpList();<br />jumplist.KnownCategoryToDisplay =<br />JumpListKnownCategoryType.Recent;<br />jumplist.AddToRecent(pathToFileOfRegisteredType);<br />jumplist.AddUserTasks(new JumpListLink(path, &quot;label&quot;));<br />jumplist.Refresh();<br />} <br />
  13. 13. Common Shell Folder Picker<br />CommonOpenFileDialog dialog = <br />newCommonOpenFileDialog<br /> {<br />IsFolderPicker = true<br /> };<br />if (dialog.ShowDialog() == CommonFileDialogResult.OK)<br />{<br /> explorerBrowser1.Navigate(dialog.FileAsShellObject);<br />}<br />
  14. 14. KnownFolders<br />
  15. 15. Task Dialog Command Links<br />TaskDialogtaskDlg = newTaskDialog();<br />TaskDialogCommandLink button = new<br />TaskDialogCommandLink(&quot;name&quot;, &quot;text&quot;);<br />buttonElevation.Click += <br />newEventHandler(button_Click);<br />taskDlg.Controls.Add(buttonError);<br />taskDlg.Show();<br />
  16. 16. ApplicationRestartRecoveryManager<br />// This works in Vista but there was no managed way of doing this before!<br />ApplicationRestartRecoveryManager.<br />RegisterForApplicationRestart(<br />newRestartSettings(&quot;restart&quot;,<br />RestartRestrictions.None));<br />This is the simplest way of forcing an app restart when it crashes<br />
  17. 17.
  18. 18. More information:<br />http://code.msdn.microsoft.com /WindowsAPICodePack<br />http://code.msdn.microsoft.com /Win7DeveloperGuide<br /> http://www.microsoft.com/visualstudio<br />/buildabetterapp/ <br />
  19. 19. http://blog.mrlacey.co.uktwitter.com/mrlacey<br />
  20. 20.
  21. 21. Next time:Christmas CodeFestDecember 3rd<br />

×