Wednesday, February 08, 2012
I've been excited about C++ AMP since it was first announced back in June. What's C++ AMP? It stands for Accelerated Massive Parallelism and it's about harnessing thousands of cores on accelerators like GPUs. You can speed up some applications by a factor of 10 or more. Not 10%, 10x. And you don't have to learn some C-like language, you get to work in C++. It's done almost entirely with libraries, which means you can use C++ AMP from a variety of applications, including Metro apps for Windows 8. If you check my Concurrency category you'll see I've been writing code (and words) for months now. I just haven't been putting those words here on my blog. Instead, they're going into a book, for Microsoft Press! Soon, I will have some chapter drafts available for review. If you're interested, I've set up a page with some details, and some links for those who want to learn more. There's increasing media coverage, including Peter Bright at ars technica and Darryl Taft at eWeek, and last week the spec was released to the public under the Microsoft Community Promise license. This means other compiler vendors can implement C++ AMP in their own compilers, allowing even more developers access to heterogeneous hardware and massive speedups for data parallel calculations. Herb Sutter mentioned it in the Day 2 keynote at GoingNative, the Visual C++ Blog included a link, and Soma blogged about it too. Dive in! There's a lot to learn. And plenty of samples to play with. I'll post updates here as I go. Kate
Friday, July 29, 2011
Since Tech Ed came and went during my blogging hiatus, I didn't get around to providing links to some of the sessions you might want to see. It's time to correct that omission: There were other sessions I attended, including a great interactive session that was not recorded called "C++ Renaissance at Microsoft: How the C++ Developers Can Get Involved" with plenty of conversation between Microsoft people and native developers. You might want to do a little searching on the main Tech Ed Video site to see what interests you. Kate
Saturday, July 23, 2011
So, you're a C++ programmer? You've written a Windows app or two in your time? Let me propose a little challenge to you. Write one. Only start with File, New and don't let Visual Studio generate any code for you. Write each line of it. Then explain it. No MFC, No ATL. That's what was asked of me a while back, and the result is a six-paper series that has finally arrived on MSDN. I have to say I really enjoyed the simplicity of the smallest Windows program possible. I also enjoyed making it better, which included making it more of a C++ program and less of a C one. I also covered a little Direct2D, a little COM, and a little "here's some other stuff you're going to want to read." If it's been ages since you wrote a Windows program in C++, or wrote one that wasn't all covered in barnacles from frameworks and libraries you might not want to rely on for simple things, I really suggest you give this series a read - it won't take long and you can use Visual C++ Express if you like - the first chapter includes links and instructions for getting all the tools you need. Better still, if you've never written a Windows in C++, why not give it a try and let me know what you think? Kate ps: Never blog that you're not blogging. Never blog about why you're not blogging, no-one cares. Just blog. Right?
Tuesday, March 29, 2011
The fourth of my Windows 7 development screencasts - Trigger Started Services - has been published. It uses the recipe (also recently published on Code Gallery) to simplify writing a service in managed code that starts only when it is notified by the operating system of a particular trigger. In my screencast I use the example of a USB device being plugged in. There are plenty of other triggers you could use. Adopting a trigger-started approach makes your service: - easier to write and install. No sleeping, looping, having a config file to say how long to sleep for, etc.
- use less CPU when there's nothing to do
- respond more quickly when there's something to do. It's not in the middle of sleeping for 10 minutes or 2 hours -- it is started the moment the trigger happens.
It's a win all around and if you have a service you should take a look at the available triggers and see if you can convert yours. Kate
Sunday, March 27, 2011
The screencasts for restart and recovery in native and managed code went live before the associated recipe was published. Now the recipe is on Code Gallery ready for you to use. As it says there: This recipe provides guidance and an easy way to start using these great
features in your application, removing any complication of how and where to
store your application data. What’s in the box? This Restart and Recovery recipe includes: - Complete source code of the recipe and its samples
- Managed .NET assembly
- C++ header and class files to be included in your C++ application.
- C#, and C++ test applications
- Documentation
Give it a try, please! Kate
Thursday, March 17, 2011
Here's another pair of screencasts to simplify your Windows 7 development. Both cover Restart and Recovery - one is for native developers and the other for managed. As the screencast intros say: Application
Recovery and Restart (ARR) technologies enable developers to customize an
application's behavior when Windows Error
Reporting(WER) terminates the application due to an unrecoverable error.
For example, it enables an application to perform data recovery and cleanup
operations such as capturing application state and releasing resources before
termination. It also allows developers to specify that WER should automatically
restart an application that it has terminated.
I hope they help you do the right thing when your application blows up or the machine reboots. Kate
Tuesday, March 15, 2011
You know I blog here a lot about Windows 7 goodies including taskbar integration. One of the questions I get pretty often is how to use tasks to communicate with the running app, such as changing your status, sending a new email, that sort of thing. I mentioned in an aside on another post that this requires launching some other application that communicates with the first
instance. If you'd like to do that, it just got a little easier with the release of a "recipe" from Microsoft that packages up this concept and lets you use it with very little extra code. As it says on the Code Gallery page for the recipe: This Taskbar Single Instance Recipe allows developers to easily develop applications that use "Messenger Like" tasks that change the state of the currently running instance, allowing it to react to incoming state-change notifications and act accordingly.
This Recipe includes:
- Native (C++) and managed (.NET) Source code for the Single Instance library
- Well documented native (C++) and managed (.NET) samples
- Documentation
To compile and run the recipe and samples the following items are required:
- Microsoft Visual Studio 2010
- Windows 7 – Note that only the samples require Windows 7.
Yes, this recipe is actually two recipes - one native and one managed, and comes with whitepapers explaining how it's done. I mentioned this in my Tech Ed Europe talk on Advanced Windows 7 development and it's finally released for you to use! Enjoy! Kate
Sunday, March 13, 2011
Whenever new stuff appears in the Microsoft universe, native C++ developers can get to it first. That's because they can easily call Windows APIs or COM interfaces or however it's implemented. Managed developers need to wait until the new stuff gets added to the .NET Framework or to a particular managed technology, like WPF. Take taskbar integration, for example: adding tasks and destinations, getting a progress bar or icon overlay on your taskbar icon, and so on. From the very beginning you could interact with the taskbar from native code by making Windows API calls. The Code Pack is a popular managed wrapper from Microsoft that enables those interactions from managed code such as Windows Forms applications. In the early days of Windows 7, WPF developers also used the Code Pack - but now those capabilities are in WPF itself. Does that mean that native developers get nothing new? On release day they gain the ability to call those APIs and that's that? Of course not. Native developers use frameworks and libraries to build their applications, and those frameworks and libraries in many cases are wrappers for Windows functionality. One of those is MFC and you should know that MFC has support for Windows 7 functionality. If that's news to you, then watch my screencast on Channel 9 in which I cover jumplists and overlays with lots of demos. It's just one or two lines of code for each of
these. Users expect their apps to behave like
this. MFC makes it simple.
Kate
Friday, March 11, 2011
Writing samples and demos is tough. You want them to do more than say "Hello World" or draw a red square, but you want them to be simple enough that people can see the "new stuff" you're demoing (WPF, or Windows 7 taskbar integration) or multi-touch) in amongst the real business logic. It would be neat if they did something actually useful, because then you might keep it around on your machine and use it, but most things that are useful are too big to be demos. Well here's a sample that lands in the sweet spot: Tasks.Show. You put in your tasks, things from your ToDo list, along with time estimates, and it keeps track of them and shows them to you. I like this view: It uses touch to let you flick tasks into categories, and has taskbar integration to let you open a specific category, add a task, and so on. All the source code is available so you can see how it's done - it is a demo, after all. You can get more details and screen shots on the Windows Team Blog. Check it out! Kate
Wednesday, March 09, 2011
I have two sessions in Atlanta:
DEV303 | Modern Native C++
Development for Maximum Productivity
Breakout Session |
300 - Advanced | Developer Tools, Languages & Frameworks C++0x, the next C++ standard, is almost upon us and it contains the most important updates to the language since the mid-90s. These new features bring more expressiveness and power to the native C++ developer. Microsoft Visual Studio 2010 has added support for some of these key features in order to enable these modern programming techniques. This session clarifies what features are in Microsoft Visual C++ 2010 and what is yet to come. It illustrates how new constructs such as lambda expressions enable better use of existing libraries and how your code can be simpler, safer and faster all at the same time. Also, see how simple it can be to implement concurrency in your application and how Visual C++ 2010 supports the difficult task of debugging parallelized code. If you are itching to show off how C++ is one of the coolest languages on the planet, this talk is for you!
DEV304 | Advanced Programming
Patterns for Windows 7
Breakout Session |
300 - Advanced | Developer Tools, Languages & Frameworks Windows 7 development in managed code can be very simple, especially for those using the Windows API Code Pack. But there's more! Your integration with Windows 7 doesn't have to be limited to simple interactions with the new API. This session goes beyond the simple and into aspects of Windows 7 development that have in the past been left for you to explore on your own. See how to create a jumplist with a task that delivers a command to your application, as Messenger and Outlook do. Explore a simple and powerful recipe for connecting to Restart and Recovery with minimal effort. Discover how Trigger Started Services can reduce your power footprint while giving your users better responsiveness. Explore all that libraries have to offer beyond "File Open" and why using a library is a better approach than having a user setting for "save directory." I'm looking forward to it. If you haven't registered yet, you should! Kate
Saturday, February 19, 2011
Imagine an app that you have running under Windows 7 as a desktop app. Now as much as you are enjoying the Windows 7 features it uses, you know there is some functionality there you could offer to people another way. Do you have to just start over to make it into a phone app? What if you want it in a browser? If you write the desktop part in WPF, will that be something you can use when you create the Silverlight code for the browser or phone apps? Well, check this mission statement:
Our goal was to enable seamless and easy sharing of decks among users across
different computers. The idea was simple, upload the deck to the cloud, and let
the user send a message to whomever the user wants to share the deck with. That
message will include a link for the receiving party to click on to launch a web
browser and run a Silverlight application that can “play” the shared deck. The
Silverlight application dynamically downloads the shared deck and displays that
single deck just as it would be displayed on the WPF application. At this point
the user can launch any of the 3 games: Learning, Matching, or Memory, with the
same user experience as the WPF application. Sounds like just what you might like to do in some of your apps, doesn't it? Oh yeah, and would you like the code? And a blog post explaining the code? And a video on Channel 9? Happy to help! Kate
Wednesday, February 09, 2011
At the end of January, the busy bees at All-in-One (OK, they're not bees, they're Microsoft engineers) released even more samples including Azure, setting a hotkey that Windows will route to your app even if it doesn't have focus, detecting if the machine has been locked (with Windows+L) or unlocked, downloading multiple files with ftp, and many more. As always these are in VB, C#, and almost all of them are also in native C++. In fact, there are just so darn many samples right now that it's getting harder to find the one you want. What a great problem to have! So they've released a sample browser to help you search and browse and generally get your hands on the code that will solve your problem and move you on to the next part of your day. What are you waiting for? Go get it! Kate
Wednesday, January 26, 2011
Not everyone knows that the Windows SDK includes a C++ compiler and linker that you can use if you don't have Visual Studio installed. Of course, Visual Studio Express is free, and you could use that to compile and link C++ apps. The advantage of using the tools that come with the SDK is that you don't have to install and configure a lot of stuff to get started. On a new machine that may appeal to you. Gus Class has posted a super-quick 3 minute video that shows how to compile one of the SDK samples using only the tools that come with it. I just wanted to elaborate on one thing. The SDK installs, by default, under Program Files. As you probably know UAC prevents applications from writing to any folder under Program Files unless the application is elevated. That's why Gus launches an elevated command prompt in this video. If you don't want to elevate your command prompt, you'll need to move the sample folders and adjust your path accordingly. Three minutes. Worth a watch. It's always good to have some tricks up your sleeve on a new machine. Kate
Saturday, January 08, 2011
The voting is open at the Tech Ed site for you to express your preferences on possible sessions. My experience indicates that submissions not shown here can still end up being sessions, and certainly not all submissions shown here will be accepted, but obviously a strong interest from the public in a session will increase its chances of acceptance. With that in mind I thought I'd show you the results of a few searches. First, C++: These have orange plusses on them because I've added them to my preferences. You'll see a grey square you can click to add them to yours. Next, Windows 7 development. Let's try Code Pack: And finally the intersection of WPF and Windows 7 searches (I had to crop the shot by hand, there's no handy search that returns just these): If you want to be sure that Tech Ed USA offers sessions you'd like to attend, the power is in your hands. (Disclaimer: some - but not all - of the submissions I am showing you here are my own.) Make your feelings known. And see you in Atlanta (I hope) in May! Kate
Sunday, January 02, 2011
The sessions have been selected for DevTeach and I was pleased to see one of mine accepted. I'll do my "Advanced Windows 7 Programming" session: Windows 7 development in managed code can
be very simple, especially for those using the Windows API Code Pack. But
there's more! Your integration with Windows 7 doesn't have to be limited to
simple interactions with the new API. This session goes beyond the simple and
into aspects of Windows 7 development that have in the past been left for you to
explore on your own. See how to create a jumplist with a task that delivers a
command to your application, as Messenger and Outlook do. Explore a simple and
powerful recipe for connecting to Restart and Recovery with minimal effort.
Discover how Trigger Started Services can reduce your power footprint while
giving your users better responsiveness. Explore all that Libraries has to offer
beyond "File Open" and why using a library is a better approach than having a
user setting for "save directory."
This is all managed code, C# and VB. The conference is after Tech Ed US this year, (Tech Ed is May 16-19, DevTeach is May 30 - June 3) so rather than you seeing a Tech Ed talk before the Tech Ed attendees do (my usual DevTeach offer) you can see a Tech Ed talk after it's been refined a bit by giving it to a Tech Ed audience. Even better!
Montreal in the early summer is a beautiful place and there's a great crop of speakers coming! Many are friends, all are top-notch. Sign up now for only $899 Canadian for the full 3 days! That's less than half the price of Tech Ed, and you travel only to Montreal. If you're a developer, give this conference serious attention. Of course, if you can do both Tech Ed and DevTeach, you will gain maximum benefit and a chance to learn all that is current in our field. That's my May 2011 plan. Kate
Saturday, December 25, 2010
A while back, I blogged about an empty jumplist for Windows Explorer and how I fixed it. I've come across another no-jumplist issue, this time in a blog post by Rick Strahl. This app never gets a jumplist, and can't be pinned to the taskbar or start menu either. Believe it or not, the reason is the executable name. I've seen all sorts of people running into issues with UAC elevation being triggered by certain executable names, but this is the first I've heard of the jumplist being taken away because of it. Rick looked into it, found the documentation, even found the Registry key and the list of "magic" words in your executable name (Documentation;Help;Install;More Info;Readme;Read me;Read First;Setup;Support;What's New;Remove) that cause the problem. Nice work! Your options, if you find yourself here, are to rename your exe, or (if, like Rick, you have a lot of stuff depending on that name thanks to COM etc) to change the Registry key so that whatever string you're using isn't the problem.
Kate
Wednesday, December 15, 2010
Those hardworking elves at the All in One Code Framework keep releasing more samples. They've added some ASP.NET samples (including a very interesting "get location from IP address" one) and some Windows 7 shell extensions, specifically a preview handler. Ah, the good old .recipe file type - an old friend of mine. But as always the samples are going to save you hours and hours of time. Here's an index to all the samples for you to explore. You might be a little astonished if you haven't checked it out before, they have: Slowly but surely the samples are accumulating to live up to the name. This should be the first place you look when you want to take on a new task. Generally speaking, everything is available in native C++, C#, and VB (the exceptions are things you can't do in native C++, like ASP.NET) with the language included in the sample name (look at CppWin7TriggerStartService, CSWin7TriggerStartService, and VBWin7TriggerStartService for example.) And remember, if you don't see what you want - you can ask for it! Kate
Monday, December 13, 2010
At the moment these are announced in the USA only. A full day of client development training for Windows 7, including IE9 and SL OOB. They say: We will look at application compatibility and transitioning your applications to
Windows 7, integrating with the Windows taskbar, developing for IE9, utilizing
the cool functionality in the Sensors and Location Platform so that your
application better responds to its current environment, leveraging the
multitouch capabilities (especially in kiosk scenarios), and creating
Silverlight 4 out of browser applications. This event is a unique opportunity,
partnering classroom learning with hands-on-labs and leveraging experts to
advise you so we can help you “win” with Windows 7.
You bring your own laptop with VS 2010, the Code Pack, the Windows 7 Training Kit, IE9, and Silverlight 4 installed (there are links on the bootcamp page) and do the labs as you go. The training is all free and you'll get hands on experience right while you're there. (It doesn't say so, but my guess is this is all managed code and that the labs are in both C# and VB.) And if there isn't one near you, you can help arrange one! It's all packaged as an event-in-a-box so all you need is a trainer who'll agree to deliver it and a room to hold it in. But check the dates and locations first -- there are over a dozen sessions scheduled already, so perhaps there's one near you. Kate
Tuesday, December 07, 2010
Windows 7 developers have tons of cool stuff at their (our) fingertips. There's taskbar integration, the new sensors and location platform, access to devices, and more. Silverlight developers, on the other hand, have so far not been able to get to all of that. Well, now you can! The Native Extensions for Microsoft Silverlight leverages the ability of Silverlight to do COM integration, and puts COM Automation around a collection of Windows 7 functionality so that Silverlight developers can use it. How cool is that? Because it's on the Code Gallery, you know it's from Microsoft. The first release, Dec 2nd, covers: - Windows Sensor API - Integrate sensors: Accelerometers, Light sensors, compasses, gyroscopes etc.
- Microsoft Speech API - Text to Speech (Speech Synthesis) and Speech to Text (Speech Recognition)
- Windows Portable Devices API - Enumerate and access content from connected portable devices (cameras, phones, music players, scanners etc.)
- Windows 7 Taskbar Integration - Jump lists, overlay icons, overlay progress display, Thumbnail toolbars etc.
- Webcam Local Encoding and Window Capture - Encode webcam capture into mp4 (H.264/AAC-LC) media - Capture user interface interaction as video
- Window Message Interception - Intercept and act on Window messages sent to the Silverlight OOB host window
This certainly gives Silverlight developers some interesting options! There are some samples that come with the library to show you what you can do, too. You might also be interested in Maor David's blog entry about the library.
Thursday, November 25, 2010
You know I just love jumplists. Probably my favourite app to have a jumplist is Windows Explorer. After all for Word, PowerPoint, Visual Studio and so on, there is a MRU list on the file menu or the like. But getting to folders I've used recently is super important to me. That's why I kind of freaked out when the jumplist for my Windows Explorer disappeared. I tried rebooting my laptop (something I do less than once a week.) No help. I caught up on updates. No help. So I started searching. And I found two articles, one about a jumplist that is slow to load itself, and other other about an "orphaned" item that couldn't be removed from a jumplist. That one helped me realize the likely cause of my problem - although I hadn't pinned a mapped folder, I had mapped a drive at a client site, and now that drive wasn't accessible any more, which is perhaps why the jumplist wasn't loading. But anyway, what to do? Based on what I read in those two articles, I navigated to %APPDATA%\Microsoft\Windows\Recent\AutomaticDestinations (that's exactly what I typed into the Run box, it figures out %APPDATA% for you.) There I saw a whole pile of apps with a strange extension, a little reminiscent of the files that hold the details for libraries: If you open any of these files in Notepad, you'll see that amongst all kinds of unintelligible strings are paths to files you've dealt with recently. What's more, you can kind of guess which app each file is for by looking at those paths - one file will have a bunch of .pptx files mentioned in it, while another will have a bunch of .xlsx files. Now, which one is Windows Explorer? Well, both articles said the same name: 1b4dd67f29cb1962.automaticDestinations-ms.I had a file called that, and when I browsed in Windows Explorer to another folder, the timestamp on that file changed. It seemed quite sure that it was for Windows Explorer on my machine too. So, I deleted it, as the articles suggested. Now I still had no jumplist, but when I then browsed to another folder, I had a jumplist with one item in it. From then on life was back to normal. Something to know if you get a stuck jumplist someday. Kate
Tuesday, November 23, 2010
Windows 7 introduced a lot of new ways for an application to give information to users. There's a thumbnail which is usually a miniaturized version of the whole application, and possible overlays of icons onto your taskbar icon (like how Outlook shows you have new messages, or Twitter shows there are new tweets) and progress bars under your taskbar icon. There are also cool ways for the user to give direction to or about the application. For example, you can right-click the taskbar to bring up a jumplist and launch another copy of the application, or another application. Right from the beginning, some applications pushed that architecture a bit to use the jumplist to communicate with the application itself. (This requires launching some other application that communicates with the first instance.) For example, Outlook has this jumplist: But this isn't the only way to send a command to an application from the taskbar, and it's not always the right one. Tasks are the right choice if you're willing to take on the extra work to code them up, and furthermore if they make sense even when the app isn't running yet. So in this example, Outlook, if I want to send a new message then I want to send a new message, even if that means needing to launch Outlook to do so. But what about Messenger? Here's how it used to look: Does that make sense when Messenger isn't even running? To me, it doesn't. Here's how Messenger handles that now. There's a much smaller jumplist: How do you set your status? With thumbnail toolbar buttons: Sweet! Much easier to code, easy for the users to understand, and they don't clutter up the place when the app is not running. Nice decision. And keep this in mind for your own Windows 7 applications. Kate
Wednesday, November 17, 2010
I like to say "If you have a Windows application, it should be a Windows 7 application." By that I mean that you should take advantage of some of the features Windows 7 offers to your apps, and you should give the user the experiences they are coming to expect on Windows 7. You should have a sensible and usable jumplist. If you have a progress bar, you should add ONE WHOLE LINE OF CODE to your app so that progress bar is also overlayed on the taskbar. You should toss your intrusive message boxes and toasts and system tray balloons and use taskbar icon overlays on Windows 7, because that's how users expect to be notified about non emergencies. You should take advantage of restart and recovery, and of being notified about events like going on battery or AC power, or coming online or offline, instead of expensively polling for them. I've written a lot of blog posts and given a lot of presentations on how to do some of those things. Now, someone is offering you a reward for putting those capabilities into your Windows applications. You can be featured on CNET Downloads if you just submit an application that uses at least one of the 13 features they identify. If your app is ready to go, submit it today! If not, why not? Kate
Saturday, November 13, 2010
Wow, these things get up there fast! My sessions were very well received and I had such a great time doing them! In the order I delivered them, they are: - Women In Technology Panel - Claudia Woods, Freena Eijffinger, Paula Januszkiewicz, and Rhonda
Layfield joined me to take questions from the audience and talk about what was on everyone's mind. There's really no video - just the title slide for the whole hour. Please listen!
- The Windows API Code Pack: Add Windows 7 Features to Your
Application - This one includes screen capture so you can follow along in the demos. You can also download the powerpoints from this page, and as I mention in the talk, the demo code is the samples that come with the Code Pack.
- Modern Programming with C++0x in Microsoft Visual C++
2010 - I had a great time delivering this talk even though it was the first time I delivered this version of it. The attendees responded by putting the talk in the top ten for the whole conference - thankyou! It, too captures the screen and slides, and you can download the powerpoints.
- Advanced Programming Patterns for Windows 7 - Another talk I was doing for the first time and I enjoyed it too. If you'd like the sample code, stay tuned - I will blog when the recipes are released. The slides are with the video of the screen and slides.
If you came in person, thank you! If you couldn't be there, please watch the videos and leave me a comment. Speaking on technical topics really is the most fun you can have standing up, and I can't do it without audiences. Kate
Thursday, November 11, 2010
Pluralsight has some great offers for user group leaders that you should really know about. Even if you don't lead a group, make sure your leader knows, because some of these offers are for members. They're offering to send swag, subscriptions, and speakers (oh yes, that could include me, it sure couldn't hurt to ask, right?) to groups. What's more, unemployed user group members can have a free one-month subscription to the Pluralsight On-Demand! library - a fantastic all-you-can-eat way to get your skills modernized and get you back working again. I wrote Windows 7 and Visual Studio Extensions courses for the library, and am working on plans for my next one. These are great people who really want everyone to learn as much as humanly possible, and work hard to make that happen. Take them up on this offer and you won't regret it! Kate
Sunday, November 07, 2010
Let's say you've written a great client (that is, not web) application. Perhaps you've added some specific features to make it great on Windows 7. Certainly you've made sure it runs on Windows 7. Or perhaps on Windows Server 2008 R2. Or maybe your app runs on Windows Azure, or Windows Phone 7. Good work! You put time and effort into confirming that your app fits your chosen platform. Now, would you like to be able to prove it with a suite of automated tests and a logo that shows you passed them? Of course you would. So head on over to Microsoft Platform Ready and take a look around. You'll find training resources to help you build applications that target Windows 7, Windows Server 2008 R2, and Windows Azure. You can test your app and get logos like Powered by Windows Azure and Works with Windows Server 2008 R2.You can even showcase your application in a marketplace, and take advantage of special offers like extended trials of developer tools from various partners. This is an obvious step for anyone building a client application, on any part of the Microsoft platform. Investigate, join, reap the rewards . Kate
Friday, November 05, 2010
You may have noticed that the fall tour I'm doing features morning talks that go till about 11:30, and evening talks that start at 6pm. I've decided that between those two, I'll spend the afternoon in a coffee shop and host an "on the road coffee and code". As I explain on the Coffee and Code page I keep for this purpose, this is really informal. Just stop by, say hi, we can talk about whatever you like. If you were at the morning session, you might want to just walk with me from the venue to the coffee shop and continue the conversation. Or if you're coming to the evening session, you might want to try to find me during the afternoon to ask something specific, then head to the venue together. Or maybe you have a topic to discuss that has nothing to do with Building Awesome Windows 7 Applications in managed code: a C++ question, or an extending Visual Studio 2010 question, or whatever. That's great, and the Coffee and Code format is just the place for us to have that chat.
If you live or work near the venues for the fall tour, I'd appreciate your suggestions (by email or twitter) for where to hold these. Obviously we need wifi, power, and a table we can hog for most of the day. My default choice is Starbucks, but if you know a better one that I can easily walk to, please tell me about it. Once I've chosen the location I can finalize the times. Looking forward to meeting everyone, Kate
Wednesday, November 03, 2010
Right after Tech Ed I will embark on a mini-tour of three Canadian cities, while Richard Campbell does two others, to be called the "Building Awesome Apps for Windows 7 Community Tour". The details are on the Canadian Developers blog. First, the dates, times, and register links:
Date | City | Time | | Thursday, Nov 18 | Montréal | 9 AM to 11:30 AM | Register | Thursday, Nov 18 | Montréal | 6 PM to 8:30 PM | Register | Wednesday, Nov 24 | Mississauga | 9 AM to 11:30 AM | Register | Wednesday, Nov 24 | Mississauga | 6 PM to 8:30 PM | Register | Thursday, Dec 2 | Ottawa | 9 AM to 11:30 AM | Register | Thursday, Dec 2 | Ottawa | 6 PM to 8:30 PM | Register | Thursday, Dec 2 | Calgary | 6 PM to 8:30 PM | Register | Friday, Dec 3 | Calgary | 9 AM to 11:30 AM | Register | Tuesday, Dec 7 | Vancouver | 9 AM to 11:30 AM | Register | Tuesday, Dec 7 | Vancouver | 6 PM to 8:30 PM | Register |
Next, descriptions - what are we going to do? We're going to make you better Windows 7 developers, that's what. We'll do some Code Pack coverage (sure, jumplists, taskbar stuff, but beyond that - some of the material from my Advanced Windows 7 Development at Tech Ed Europe will get its Canadian debut) and then dive into touch development. There are abstracts in John's blog post. If you can't get to one of those cities on the appropriate day, never fear - there will be a webcast, too. Please spread the word about the webcast throughout North America, everyone's welcome! I'm looking forward to this tremendously!
Kate
Monday, November 01, 2010
Here's something that happens to me a lot. I'm working on a project that is mostly Technology A, but I need a little Technology B. I want a sample or two to show me what it can do. I search the web, but often find mostly things written by people who don't know what they're doing and are posting their (possibly flawed) code into question-and-answer forums. I search MSDN, but often the newest technologies don't have their samples yet. I also remember to check if the All-in-One Framework people (I blogged about their coding standards document earlier) have anything. And if I still get nowhere I start asking people I know if they have one. Well, now those helpful folks at All-in-One are kicking it up a notch. And remember, they cover all technologies and languages related to Microsoft tools. (Want to know more about them? Here's a fun video.)
And this goes back to one of my earliest blog posts - what you want may be what I need to give. Imagine it's your job to decide what samples to write. How are you ever going to find out what developers out in the big wide world want samples of? You could come up with a great idea and then find out people already had all the samples they needed for that. So that person wants ideas for samples. And here you are needing a sample. See how that works?
Just visit the wiki page and follow their instructions. It's a tad more complex than "shoot me an email and tell me what you need" and for good reason. Give it a whirl if there's something you need! Kate
Sunday, October 24, 2010
Hilo, the reference application project from the C++ team that doesn't use MFC or the .NET Framework, is back with another sample. You've seen nice graphics in the way photos are treated, a ribbon UI, and now you can see social media integration with Flickr uploads, touch support, and Windows 7 jumplist support. And remember, all the code is available for you to explore and learn from. Take a look and see what you think. If you want to know how to build a modern UI and a modern set of functionalities (like web services) then this is the reference application for you. Kate
Saturday, October 16, 2010
Jennifer Marsman has built a very nice list of Windows 7 developer resources. Of course, she had me at Code Pack (the very first item she lists as a matter of fact), but she carries on, drilling into both native and managed scenarios, covering libraries, SDKs, training materials, UX guidelines, samples, blogs - even Twitter handles! There is a LOT of material out there and it's a little bit fragmented. This is a great post to help you find your way around. Remember, if you have a Windows app, it should be a Windows 7 app! Kate
Wednesday, October 06, 2010
The Tech Ed Europe Session Catalog has been updated with my third talk. In the order they're happening, I have:
WCL322 - The Windows API Code Pack: Add Windows 7 Features to Your
Application
DEV311 - Modern Programming with C++0x in Microsoft Visual C++ 2010
WCL329 - Advanced Programming Patterns for Windows 7 The first two I blogged earlier, but the third is new. Here's the abstract: Windows 7 development in managed code can be very simple,
especially for those using the Windows API Code Pack. But your integration with
Windows 7 doesn't have to be limited to simple interactions with the new API.
This session goes beyond the simple into aspects of Windows 7 development that
have, in the past, been left for you to explore on your own. See how to create a
jump list with a task that delivers a command to your application, as Messenger
and Outlook do. Explore a simple and powerful recipe for connecting to Restart
and Recovery, with minimal effort. Discover how Trigger Started Services can
reduce your power footprint, while giving your users better responsiveness.
Explore all that Libraries has to offer beyond "File Open", and learn why using
a library is a better approach than having a user setting for "save directory."
It's going to be a great week! Kate PS: About the fourth item you might see under my name ... stay tuned!
Monday, October 04, 2010
I started paying attention to "app compat" around the time Vista was in beta. It stands for Application Compatibility and refers to all the various techniques for ensuring that an application continues to work when it's moved to a new environment, such as from XP to Vista or to Windows 7. Some of these techniques involve changing the source code of the application and rebuilding it, but others don't. And paradoxically, in order to be good at those no-writing-code techniques it helps if you're really a good developer. It really helps if you have strong skills in areas that the .NET Framework generally hides away or abstracts from you. There are folks whose job it is to solve app compat problems. It's the kind of job that really appeals to me, where you aren't exactly sure how things are going to go each day when you get up, and you think on your feet and react to what you find. And now there's an opening to be such a person if that interests you. Aaron Margosis writes: The job is basically
to figure out why applications that are important to the customer and that work
on earlier versions of Windows (typically running as admin) no longer work on
Windows 7, and then to get the apps to work correctly without reducing security
posture and (typically) without seeing or touching source code. Don’t worry – we will teach you the
tricks.If you enjoy problem solving on
the Windows platform, you will love this job.
Interested? Have some experience writing Windows apps in native C++ or C? Know a little about how Windows works? Think that being handed unknown problems and asked to fix them is more fun than a regular job? Then read the blog post and apply! Kate
Saturday, October 02, 2010
As a Canadian RD, MVP, speaker, and general involved-in-the-developer-community-person, I interact a lot with the nice folks at Microsoft Canada. It's not unusual for Canadians to be transferred to Redmond to work at "the mother ship" and I tend to keep an eye on them in their new roles and watch what they're up to. That's even more likely when they go to an area that interests me, as Mark Relph did in the summer of 2009. He appeared recently on Dot Net Rocks to talk about developing for Windows and I really enjoyed listening to the episode. I'm not the only one keeping an eye out, obviously, since John Bristowe blogged a nice summary of the episode with helpful links. Be sure to read that, then listen to the episode, then come on back for the links. Kate
Thursday, September 30, 2010
By now I'm quite addicted to jumplists. When I want to open a PowerPoint deck or a Word document, and I have another one of those open, I just right-click that instance, spot my document among the recent documents, and click it to open what I want. It frees me from remembering exactly where documents are, or opening folders just to open documents they contain, and I like it a lot. I also like the tasks lists that more and more applications are adding, like these: But older apps have so much less to offer: What if you could add tasks to the jumplist of any application, without needing access to the source code? That's what Jumplist Extender does. There's a nice review on How To Geek that demonstrates adding tasks to the calculator that comes with Windows. Neat, isn't it? Get your own copy and have some fun. Kate
Friday, September 24, 2010
Monday, September 20, 2010
This release actually slipped out at the end of August with little fanfare. But you really should check in to it. First, if you're already a Code Pack user, you'll want the update for the bugfixes and related tweaks. If you're one of the people who looks at the source code to this useful library, for example for an interop reference, you're going to find it much improved. One really obvious thing is that all the samples are now happy to convert to VS 2010 which had been an issue for me with 1.0.1. As well there are three new capabilities: Shell Object Watcher, Preview Handlers, and Thumbnail Handlers. Shell extensions used to be offlimits from managed code because they run in process with either the shell or whatever process launched them (which could be anybody's app that uses the Common File Dialogs) and you were forbidden (but not prevented) from using managed code in that situation. The issue was that if the launching process was already managed code and it had a different CLR loaded, then weird things would happen when your managed code wanted your own CLR. But now that restriction is lifted, so you can write preview handlers (which are out of process, so you were allowed to write them before) and thumbnail handlers (which are in process and therefore were native code only before) for your own file types. The Code Pack makes that pretty simple, all things considered. Download it, install it, and if you have issues someone is reading and responding on the discussions tab, so please join the conversation. Kate
Tuesday, September 14, 2010
I love speaking at DevTeach. It's a must-do conference for a lot of A-list speakers and it's always fun and informative. I've blogged about it a lot already. Now Jean Rene has released the session videos online. So if you didn't get out to see us, you can still watch - how cool is that? Scroll down the page till you see this: Click on the title to watch the video, and on the Material link to get the powerpoints. (I recommend you watch these in the reverse order than they are shown - first Lighting Up, then Code Pack. Enjoy! Kate
Thursday, September 02, 2010
I'm having a Coffee and Code of my own in downtown Toronto on September 23rd all afternoon. Actually, I'll start at 11 and be there until 6 to catch the "stop by after work" folks. If you've heard of Coffee and Code at all, you know how this works. If you haven't, I've made a page on our web site about it. Just drop in and ask me "Is it true that the C++ language is getting new keywords and stuff? How can that be? And does it really matter?" or "Do you have the Windows Phone 7 tools installed? Can you show me an app on the emulator?" or "Is Visual Studio 2010 really nicer than Visual Studio 2008?" or "What local user group meetings should I be coming to?" or whatever else is on your mind. So stop by any time between 11 and 6 on the 23rd to the Starbucks at Yonge and King. I'll be at the big table at the back, just walk up and say hi. We'll talk about whatever is on your mind, maybe some of you will talk amongst yourselves, maybe you'll show me what you're working on. I'm looking forward to it! Kate
Wednesday, August 25, 2010
I mentioned Hilo when it was first released. This is a cool project doing Windows 7 development in native C++ with no frameworks - not MFC, for example - so you can really see just how it is done. It's not just code, it's also a walkthrough of their design thoughts, and explanation of that code. The next application, Hilo Annotator, is ready. It features a ribbon, it uses the Windows Imaging Component, Direct2D, and so on. While you probably don't need an image annotator, you may find the code useful in your own applications. And remember, this is all native C++ code.
Your best place to start is the Visual C++ Team Blog entry about it. It's rich in links and has a nice screenshot too. Kate
Monday, August 09, 2010
Visual Studio 2010 has pretty cool Windows 7 integration. It gets jumplists right, for example:
But it could do more, and this little add-in adds some fun extras. Here's a taskbar progress bar overlay during a build: (If your build results in errors or warnings, you'll also get a taskbar icon overlay when it's done letting you know about them.) And here we have handy thumbnail buttons - for build, debug, and start without debugging:
Give it a whirl! You can download it from the gallery, or use Tools, Extension Manager, Online Gallery right in Visual Studio and search for Taskbar.
Kate
Thursday, July 22, 2010
Would you like your machine to use up to 25% less power? Are you on XP now? You can see a big improvement by switching to Windows 7. There are some other things you can do too, like changing some drivers, but those are probably a bit difficult for most people. We have a number of machines kicking around the office that we've left on XP because they're really just file and print servers, people don't use them directly very often, so the obvious UI benefits of Windows 7 didn't seem relevant. But lowering the power bill is relevant, right? Or, if you're out and about with your laptop, having the battery last longer is relevant, right? Here's the blog where I found some numbers ... it's a summary of a longer whitepaper and you should probably read that too. Kate
Sunday, July 18, 2010
Pluralsight On-Demand! now has a second Windows 7 development course. I'm happy to see this - Eric and I co-ordinated while I was doing my course. In the first modules that are online now, he tackles topics that I did not - Restart and Recovery, Task Dialog, and Search. Feel free to use both courses to make yourself a better Windows developer! Kate
Friday, July 16, 2010
I've had a chance to watch a number of the videos from the Windows Summit - an online event to help you with Windows development of all kinds. You can learn more about it and register at the main summit site, or check the lists of sessions for developers. The only trick is that once you've registered, you need to go to a different site to actually watch the sessions. Once you know that (and there is a link on the main site) you're all set. I've been getting "Windows 7 for Developers" training since before the first public beta, so I had seen a lot of this before. But several sessions were noticeable improvements from the way that material had been covered in the past, and none of them were poorly done, so I recommend this as a way to learn the concepts that are important to anyone writing for Windows 7, and to learn the advantages that Windows 7 can offer to you as a developer and to your users. I saw three different approaches to code in the sessions I watched: - Full on demos with Visual Studio involved
- Code on the PowerPoint slides, and links to resources that include code demos
- Mention the name of the API but don't show how to use it
I also saw a mix of native and managed code, with some sessions going all the way to the native side of the spectrum and some all the way to the managed side. Most of the sessions mentioned the Code Pack, of course, and call out a link to it in their resources. Even if you know all about the taskbar, maybe you could learn about power management, or background services, using sensors, or writing location aware applications? It's really worth taking a look around.
Kate
Wednesday, July 14, 2010
Here is something I've been asked more than once, and seen asked on various forums as well. I'll paraphrase rather than quote one specific asker: We have an application written 15 years ago that's been working flawlessly. But when we run it on Windows 7, the users can't find the files it writes. Worse, there are no error messages, so they think they've saved the files, but when they go to C:\Program Files\MyGreatSoftware\UserExports - the files aren't there!
Often, the question trails off into a rant about how sneaky and mean Windows 7 is to somehow prevent access to Program Files but not give error messages. The rant might also include a paean to how amazing the lost files were and how many workyears of productivity have been lost now that these files cannot be found, and why this means you can't trust Windows to do something as simple as write a file to the hard drive. Sometimes, the asker has established that this is related to UAC and they are recommending everyone turn it off to avoid this disaster. I thought I would make some less drastic suggestions. First, your files are not lost. A few people know this, but they then claim the files are almost impossible to find and no end user will ever find them. Let's tackle this one first because if you know this trick you may be able to get by without changing anything else about your application. Tell the user to go to the place they expect to find the files, say C:\Program Files\MyGreatSoftware\UserExports. Then have them look in the toolbar for a button that says Compatibility Files. Click it. Ta-da! Ok, now the next thing is, why the heck are your files being written there? Because you are trying to write to a protected area and you don't have a manifest. You have several things you can do about this, and they boil down to two main things: One, don't write to a protected area. You can get this by installing somewhere other than Program Files (not a good idea) or by changing the application to write to a better place. Two, get permission to write to the protected area. This means running as administrator. Train the users to right-click Run As Administrator when they run the app, or train them to set the Compatibility Settings for the app (neither very likely) or ship the application with a manifest that includes requireAdministrator. Now matter how you arrange this second thing, your users are not going to like agreeing to the UAC prompt every darn time. So really, that brings you back to number one, don't write to a protected area. Use AppData instead - there's a simple function call to get that path on any machine (including older XP machines) and you'll be in fine shape. If you think your users can't find that, and the files are for the users and not just some internal settings, then use a folder under Documents - again, there's a simple function call that will get you the path.
If virtualization makes you nuts - that your code thinks it's writing to C:\Program Files\whatever but really it's writing somewhere else, and the OS is cheerfully lying to it and saying all the writes succeeded - then put a manifest on your app. Doesn't matter whether it's requireAdministrator or asInvoker. Doesn't matter whether it's embedded (VS will embed them for you from 2008 on easily, and there are tools that do just manifest adding) or just a file of XML in the same folder as the exe. Once the app has a manifest, virtualization stops. Of course this may mean the users get all kinds of Access Denied errors that they don't like. Now you see why virtualization was invented. Should you rely on it? No. For one thing, it may go away in some future version of Windows. And it goes away when you add a manifest, which for many people happened when they migrated to a new version of Visual Studio. What you should do is understand it, including how to find the virtual store, so it doesn't make you quite so crazy. Now go turn UAC back on, Kate
Monday, July 12, 2010
There are two services I use not just every day, but many many times a day. One is email and the other is Twitter. Facebook and StackOverflow also get their share of attention, but one thing that sets Twitter apart from Facebook and StackOverflow is the proliferation of clients you can use to access it. You can go to the web page, and do it all in a browser, or you can get any of the many clients available to give you a richer experience. The same is true for email - I can use Outlook or I can use OWA and do it all in a browser. Recently I found myself facing a full week away from home and the office and with no way to get a VPN although I had great internet access. I could listen to CBC radio and watch Canadian TV but I could not bring my email in Outlook. The first day was ok, but not great. I found myself wanting to email people, and I had to open Outlook to poke around and get their email addresses, then paste them into the OWA new message. It was so different from the usual fast-as-thought process of typing the first letter or two of their names and pressing tab. I also had to delete my own spam, because I don't like server-based spam filters and have been really happy with my client-side spam settings in Outlook. The little preview windows weren't as informative as I wanted, my old appointments weren't showing up, there was no to-do bar, and deleting messages or waiting for the new window when I replied to messages just took too darn long. By day 3 I was about insane. Finally my favourite sysadmin (who I was smart enough to marry almost 30 years ago) got Outlook-over-http working for me and I could go back to normal. I was utterly astonished at the effect on my mood that not having my client application had on me, and the effect of getting it back. It was very distinct and unmissable. The browser solution just wasn't good enough for me - and OWA is an amazing feat of engineering, with a way richer UI (delete key works, F keys work, etc) than most browser-based solutions. It got me thinking, once my cheerful mood had let me catch up on some outstanding work, about client apps in general. Why do I only use Twitter in a browser? I've tried a whole number of clients but I always end up back in the browser. I think it's because clients have to be well-designed to work well. If they hog resources, jump in your face too much with focus stealing or balloon tips, or insist on being sized a certain way then they don't get a chance to show you their good side. Twitter is pretty young and I don't think we've really had time to winnow the good client features the way we have with email. With that in mind, and believing a good client really will be a better experience, I've decided to try MetroTwit. I've heard really good things about it and I honestly believe that client apps make more sense for these sorts of information feeds. So far, I like it. I get toast for new tweets, a new tweet counter as a taskbar overlay icon, and such a delicate consumption of my CPU and disk activity that I can't tell if it's running or not. You might also be interested to hear why the developers chose WPF, and what that led to for the team: over just a couple of months, what we’ve achieved with MetroTwit was simply not possible without
WPF considering the few precious midnight hours we put into it on most days.
According to the rest of the team (the real developers), apparently I owe much
to data-binding which I’ve been told is nothing short of a miracle.
If you have a choice of using a browser or using a client app, which do you choose? Is it always the same or does it vary with the business purpose you use it for? While we don't represent our users exactly, we can still learn from our own personal choices and our emotional reactions to software. Kate
Saturday, July 10, 2010
I'm not sure when this started, but DevX has a whole area for Visual Studio 2010 articles. They've got handy links to download a trial and a training kit, walkthroughs of creating extensions (a simple blogging one, and adding your own language to the IDE), and lots more. It's a combination of articles, webcasts, and downloads that cover not just Visual Studio but some of the things you can create with it and what's new in related tools. Of course I've seen some of the material before, but that just shows that it's comprehensive. Take a look around! Kate
Friday, July 02, 2010
I love demoing restart and recovery. This is the feature that will bring many users to Windows 7 - getting your work back even after the application blows up. Sure, Word saves your document every 20 minutes - but why does it seem I always lose 19 minutes of work? In my simple demo apps, there's a form with one or two controls on it, and one is some text, and when the application blows up I write all the text out, and then on restart I reload it from wherever I wrote it to. It's simple and for most applications it's exactly what you want. But for some applications that approach won't work as well. For example, what if you have an MDI application and the user has 20 or 30 documents open, each with unsaved changes, when the application is terminated? There may not be time to save all those unsaved documents. And then on restart, perhaps the user doesn't want them all restored, or at least not with their real names... it can get complicated. You are going to need to know your own application and make an intelligent decision about how to handle restart and recovery for your application. But it might help you to know how a certain MDI application near and dear to all our hearts does it ... Visual Studio. Visual Studio does a Word-like autosave every 5 minutes. When the application blows up, it doesn't do anything in particular on the way down. But when it's restarted, it takes a look at the files it has auto recover versions of and asks if you want any of them. You might, you might not, and as the user it's up to you. Zain Naboulsihas a tip-style blog post that explains how it works and how you can control it. Read that for its own sake, since you're probably a Visual Studio user and should be using it as effectively as you can. But also take the opportunity to think about a good design for restart and recovery in your application, which is probably a little more complicated than one text box and one other control. Kate
Wednesday, June 30, 2010
I'm recording some videos again (I'll announce when the project is live) and I'm doing it, as I really like to these days, in a bootable VHD. I've got the environment set up just the way I like it, without messing with my day-to-day setup, and as an extra bonus I avoid the distractions that Outlook, Instant Messenger, Skype, and the Favorites menu in my browser have to offer. When I went to record the first video I realized I had forgotten to install Camtasia in the VHD so I quickly downloaded a trial from www.techsmith.com. I got to work recording my video, editing it, and so on. Then I rendered the video. This can take a few minutes, but I don't complain because I know it's doing a lot of work. But I got a great surprise ... this latest version uses the taskbar progress bar overlay, so that I can put the rendering into the background and work on something else full screen while it renders. I can still see at a glance how it's doing, but I don't have to keep the little progress window on top. It's a really nice touch. Then as serendipity would have it I spotted this video on Channel 9 that calls out this and other Windows 7 features in TechSmith products. It's only 9 minutes long, so go and watch it. And if you haven't added Windows 7 features to your client apps yet, why not? It really makes a difference.
Kate
Sunday, June 20, 2010
The Windows API Code Pack is a wonderful library. It wraps many Windows 7 and Vista features so that you can use them from managed code without learning any interop techniques. I've made extensive use of it in demos, presentations, and training materials. I've also blogged about it extensively, primarily in my Client Development category and Windows 7 category. Folks who've seen the Code Pack in action tell me they are going to use it in their Windows 7 applications immediately, and they're right to do so. Well now I'd like to do a bit of a headcount. If you have a real application (not a demo written to show how Windows 7 features work or how the Code Pack works) please drop me an email (you can see my domain, right? well my address before the @ is just my first name) and tell me who you are, where you work if you made the app for work, what the app does, and whether it's for sale or for internal use. Plus anything else you want to tell me like the Code Pack saved you weeks of work or got you promoted or helped you win the lottery . Unless you specify in the email that you're only telling me this, I will be passing it along to some other people, so keep that in mind. I really want to hear what you're using it for, so please let me know! Kate
Thursday, June 10, 2010
Another terrific Tech Ed has come to a close. I never really got used to the weather in New Orleans, but I loved the food, I loved that we could walk to just about every dinner or party, and I loved the locals I met. I would have liked a little less walking within the convention centre itself - that building is a mile long and I had to go the whole length and back several times each day! I have a few pictures from inside for you. This is the "RD couch" in the community area. Good for hanging out while waiting to be on Channel 9. As you can see, non-RDs were hanging out here too.
The table for the Code Pack was giving away copies of the Code Pack on these slightly bizarre USB keys. I meant to keep one for myself but got carried away handing them out at my session (along with cards for a free trial of the Pluralsight On Demand! library). Also the shot-glass-on-a-string-of-beads is pretty brilliant for New Orleans swag. "Give it a shot!" they say. This is the room for my C++ talk. That's Juval Lowy, who spoke right before me, up on stage. You can see he did a pretty good job of filling the room, which holds 1000. I got somewhat less than that, but was happy with the turnout and the evals for the C++ talk. Both my talks are available online already, by the way, which is astonishingly quick.
I love the "face time" with Microsoft people (including "my" product teams as well as folks in marketing, developer outreach and education, and so on), with my fellow RDs, MVPs, INETA folks, and speakers of all stripes, and with attendees. Booth duty, where you spend long minutes shifting your weight from foot to foot praying someone will come by, is a bit like of box of chocolates. An eager attendee comes forward, meets your eye, smiles ... for every "can you tell me where to find the blinky Windows 7 pen?" there is a good solid question or expression of interest in my actual technology. I got one question on Wednesday from someone who just wanted to know what booth to go to for it to be answered, only to learn it was this booth and that in fact I was probably the only person in building who could have answered it. I sure liked that one! Next year, Atlanta:
But I may not have to wait a year for another Tech Ed experience.
Kate
Tuesday, June 08, 2010
Are you interested in developing for Windows 7? I bet you are. I know I am. So perhaps you would like (OK, I'm quite sure you would like) the Windows Summit. It's a virtual event hosted at http://www.microsoft.com/windows/windows-summit/ and it claims of itself: Windows Summit 2010 is designed for people who engineer and test Windows 7
PCs, devices, and software. Three technical tracks are offered to show how to
best use Windows 7 and Internet Explorer, helping you build great solutions and
gain a competitive edge. It's free (you just have to register) and features about a dozen talks in each of three tracks. The Software track will release June 16th, so you can mark your calendars for then and amuse yourself in the meantime with the Device and System tracks. The Software talks will cover multi touch, ribbon, IE9, Windows Error Reporting, sensors and location, power awareness, background activities (that's services and scheduled tasks) and performance. All good stuff. I'll report back in mid June when I can actually play the sessions and look at the downloads, but it seems to me it's going to be a very good resource. Kate
Wednesday, June 02, 2010
I posted a quick hit on MFC and Windows 7 back in April, mentioning the ribbon and showing you how simple icon overlays and jump lists are. Now Marian Luparu has a nice long article in Visual Studio Magazine. He covers tabbed thumbnails, the ribbon, multi-touch, jump lists, and shell integration for your own thumbnails, preview, and search integration. Then he manages to mention graphics and animation APIs and parallelization. Can't argue with his conclusion: Overall, Windows 7 is an exciting release for developers. With thousands of
new Windows APIs made available to native coders, Windows 7 provides an enhanced
experience for desktop applications.Visual Studio 2010 is the IDE of choice to take advantage of the Windows 7
platform. With enhancements in MFC and the ATL and the addition of new IDE
Designers and Wizards, Visual C++ 2010 gives you the opportunity to be on the
cutting edge in terms of leveraging OS functionality.
Check it out! Kate
Friday, May 21, 2010
The C++ team gave me a heads up about a neat new initiative called Hilo. Here's a quick description: “Hilo” is a series of articles and sample applications that show how you can
leverage the power of Windows 7, Visual Studio 2010, and Visual C++ to build
high performance, responsive rich client applications. Hilo provides both source
code and the written guidance that will help you design and develop compelling,
touch-enabled Windows applications of your own.
The articles are on MSDN - the first is there now - and the code is on Code Gallery. I like this section from the article: The rich user experience of Windows 7 is best accessed through a powerful,
flexible language, and that means C++: by using C++ you can access the raw power
of the APIs for Windows 7. To build the Hilo sample applications, all you need
is Visual C++ Express and the Windows SDK for Windows 7, both of which are
available as free downloads.
Hilo applications show how to design and develop an application for Windows
7. But while the code showcases the APIs for Windows 7, it is not wedded to any
particular application framework. Instead, Hilo implement a lightweight common
application layer that directly uses and highlights the APIs rather than
obscuring them. This common application layer is used to support all of the Hilo
applications. It illustrates the best practices for developing Windows
applications, and while it is not complete—it was designed simply to provide the
features needed by the Hilo applications—it does show the best practices used in
designing re-usable frameworks and can be extended to provide additional
features.
Looking forward to reading more! Kate
Friday, May 07, 2010
Jani Jarvinen (a Finnish C# MVP) wrote a nice article about using sensors with Windows 7. He mixes and matches .NET 4.0 and Code Pack capabilities, and has links to plenty more information. I like the screenshots and the step by step approach. Windows 7 really does make this so much easier than it used to be. He gets you started with both an ambient light detector and some simple location code.
A little more exotic approach comes from "gleat" who has a Code Project article using a Wiimote as the accelerometer. He starts out simple - here's how to download and install the driver - and then goes into writing a client in C#, leveraging Code Pack of course. But then he says hey, were you wondering how to write a driver? and wham! you're hip deep in C++. It's all well explained, though, so if you want to learn more about this, what a terrific way to start.
If all of this is making you wish you had Windows 7 somewhere to play with, but you don't want to buy it, don't have an MSDN subscription, don't qualify for BizSpark etc, then what you need is a free 90 day evaluation of Windows 7, right? I found that link on this handy Doug Turnure blog post from earlier this year that includes some video links I hadn't seen before. Have fun! Kate
Wednesday, May 05, 2010
I was just looking up the session codes for my Tech Ed talks next month (my flight to New Orleans leaves a month today, at about this time actually) and spotted something unexpected:
DEV316 | Modern Programming with
C++0x in Microsoft Visual C++ 2010 Session Type: Breakout Session
Track: Developer Tools, Languages
& Frameworks Speaker(s): Kate Gregory Level: 300 - Advanced Why wait
for the C++ committee to finish the specification when you can enjoy much of the
power of C++0x today! C++0x, the next C++ standard, is almost upon us and it
contains the most important updates to the language since the mid-90s. It even
accepts the existence of multiple threads for the first time in the history of
the language. Needless to say, these new features bring more expressiveness and
power to the native C++ developer. Visual Studio 2010 has added support for some
of these key features in order to enable these modern programming techniques.
This session clarifies what features are in Visual C++ 2010 and what is yet to
come. It illustrates how new constructs such as lambda expressions enable better
use of existing libraries and how your code can be simpler, safer, and faster
all at the same time. If you are itching to show off how C++ is one of the
coolest languages on the planet, this talk is for you!
WCL316 | The Windows API Code Pack:
Add Windows 7 Features to Your Application Session Type: Breakout Session
Track: Windows Client Speaker(s): Kate Gregory Level: 300 - Advanced Accessing new Windows 7 features is a challenge from
managed (.NET) code. The level of interoperability required is out of reach for
many developers. The Windows API Code Pack for the Microsoft .NET Framework is a
sample library you can use in your own projects today that provides access to
new user interface features (taskbar jumplists, libraries, sensor platform, and
more) as well as "behind the scenes" features that make your applications more
aware and responsive (restart and recovery, power management, and more.)
Discover a shortcut to Windows 7 development for Microsoft Visual Basic and
Visual C# programmers and get started today.
The first digit carries meaning, but the last two don't. So I don't really know how they both got to be 316. Since I often have trouble remembering my session codes, this should halve the effort for me .
Kate
PS: I checked whether the Brian rule still applies. You can too, by just dropping down the "Speaker" box on the session catalog page. I'm happy to report there are 9 Brians and I reached 9 obviously female names (ignoring Alex, Chris etc) while I was still in the C's. Good news, in my opinion!
Monday, May 03, 2010
The Windows API Code Pack is one of my favourite libraries. For Windows 7
features that are not yet in the .NET Framework, it simplifies access
from managed code, saving you from learning how to do interop. And it
comes with a nice suite of samples that help you to understand how the
feature works and how to use it. I've been incorporating Code Pack into a
lot of the modules in my Pluralsight Windows 7 tutorial, and using the
samples for demos when they're appropriate. In just a little over 5 months, almost 70,000 copies have been downloaded directly:
The thing is, Code Pack is not a product. You can't call for support on it (though there are discussion and issues section on the Code Gallery page, and people really do read them.) There's no guarantee that there will be more versions in the future. But there are plans for at least one more version, and Yochay is looking for your thoughts on it.
If you ever wanted to add a feature to the Code Pack, were looking for some
specific Win32 API to be wrapped, or just wanted to pass us some feedback, this
is your opportunity. Please send us your feedback or file a bug using the Discussions
or Issue
Tracker for the Windows API Code Pack.
He also mentions that about the same number of folks have downloaded other vehicles (eg the Windows 7 Training Kit) that deliver a copy of Code Pack. Those are some nice numbers! Anyway, if you haven't tried it yet, please do, and if you have and there's something you want, please chime in! Kate
Saturday, May 01, 2010
On Thursday night I was the surprise mystery guest for the St Louis installment of the .NET Rocks Roadtrip. What a fun little jaunt that was! We recorded an episode of .NET Rocks, (talking about Windows 7, C++, and educating developers) then Carl and Richard both did very interesting presentations. I had seen parts of Richard's before, but Carl's was all new to me and I will just say if you live in the half of the roadtrip that hasn't happened yet, you really need to make an effort to be there and be part of it!
Here's a blog entry by Nicholas Cloud, and another by Brian Williams, and a picture by fallenprogrammer of us getting set up. The next morning featured breakfast at Cracker Barrel (an experience) and then a ride to the airport in the RV for me and Kindler Chase, who had joined them in Tulsa, before they headed Chicago-wards. It sure was fun to be part of it! Kate
Thursday, April 29, 2010
Would you like to learn more about developing for Windows 7 in C# or VB? My Pluralsight On-Demand! tutorial has just gone live. 9 of the 11 modules are there now and the last two will be shortly. As the abstract says: This tutorial is aimed at Windows developers (Windows
Forms or WPF) who want to add Windows 7 capabilities to their application. The
emphasis is on providing a helpful and efficient user experience by hooking into
what Windows 7 has to offer. You do not need to know how to interop to native
code or how the Windows 7 features work internally.
The table of contents looks like this: - Light Up on Windows 7
- Windows 7 Jumplists
- Taskbar Overlays on Windows 7
- Taskbar Thumbnails on Windows 7
- Network Awareness on Windows 7
- Power Awareness on Windows 7
- Windows 7 Libraries
- Windows 7 UAC and Manifests
- Partitioning Administrative Tasks for Windows 7
- Known Folders for Windows 7 (under development)
- Scheduled Tasks on Windows 7 (under development)
The course has been a lot of fun to put together. I used the Code Pack to keep the amount of code you write to a minimum. Some of the demos use samples that come with the Code Pack; others use my own code, and you can spot those by the Demos download link. The content is all subscribers-only, but you can get a Guest Pass to check it out. Also, RDs and MVPs get a free subscription, so if you qualify, this would be a great time to use that. Let me know if there are more topics you'd like to see me cover (after I get this one finished, of course!) Kate
Tuesday, April 27, 2010
MFC had some Windows 7 support starting with the release in between Visual Studio 2008 and Visual Studio 2010. There was a ribbon, for example, though there was no designer. In Visual Studio 2010 there is a ribbon designer, very nice, and tons of UI fun as well. In this post I'd like to focus on some MFC support for taskbar interactions. Any idea what these two lines of code do?
HICON i = LoadIcon(NULL,IDI_WARNING); SetTaskbarOverlayIcon(i,L"Warning");
Here's the visual evidence:
Yep, you load an icon and then you set it as an overlay icon on your taskbar. Nice and simple. How about this:
m_jumplist.InitializeList(); m_jumplist.AddTask(L"http://images.bing.com",L"",L"Bing",L"",0); m_jumplist.CommitList();
You need to know that m_jumplist is a member variable of type CJumpList - a new type in MFC. Here's what that code causes:
This is remarkably little code to be all up to date and modern, isn't it? If you want more info on C++ and Visual Studio 2010, here's a nice article by Sumit Kumar and a Channel 9 talk with Pat Brenner. Enjoy!
Kate
Saturday, April 17, 2010
When I show off Windows 7 features and talk about how you can add them to your apps, I usually show a "sad trombone" moment featuring Visual Studio 2008, like this: (I really like jumplists in the start menu, so I thought I would show that in my screenshot instead of the classic right-click-on-the-taskbar jumplist. They're the same.) But this jumplist isn't useful. It isn't all the .sln files I've opened before, or the projects, or anything really except some random bits of XML, icons, schemas, and code files that I dragged in to Visual Studio over the past few months while I had some real solution open.
Now this isn't poor Visual Studio's fault. It was released before Windows 7, before anyone knew that the MRU list kept by the OS itself would be important. As I've explained in presentations before, there's a reason this happens. You see, when you double-click a .docx file, Windows looks up who handles those, launches Word to open the file, and accumulates that file name on the MRU list for Word. Cool. Ditto for .txt and Notepad, etc. But Visual Studio is different, and it's different so that you can have Visual Studio 2005 and 2008 side by side on your machine, and use .sln for the solution file names in both products. You double-click a .sln file and what actually runs is a little launcher that looks inside the .sln file to see if it's a 2005 or 2008 solution and then runs the right Visual Studio and passes the solution to it. Cool. But as a result Windows isn't accumulating what you opened with Visual Studio 2008, it's accumulating what you opened with the little launcher. The jumplist for Visual Studio 2008 therefore contains only things you opened directly with it, and that's not a very useful list.
OK, so I know why. And it's nice to know, btw, that Visual Studio 2010 gets it right. And in my presentations, I usually leave it at that, encouraging you to add the one whole line of code to your app (if you're using Code Pack) so you "don't be that guy".
But wait! What if you want a good jumplist for Visual Studio 2008? Especially if you don't have Visual Studio 2005 installed any more, so you don't care about the whole pick-what-version-to-launch feature? Well, you could try this suggestion from Josh Einstein. I like that he doesn't explain it much and says "If you need more instructions then the hack probably isn’t for you." His instructions, terse as they are, are for 64 bit Windows 7. A commenter supplies the 32 bit version.
I actually haven't tried this yet. Don't want to set my computer on fire or anything . But if you feel like living on the edge, give it a whirl!
Kate
Thursday, April 15, 2010
I've been making videos lately, as I've mentioned. So among other things I've needed to know the total length of a bunch of .wmv files. Now sure, if you have a spreadsheet you can teach it to add up times. But the ironic thing is, I was asking the file system for the length (in minutes) of each video, then adding them up, when I could have just asked the file system for the total length! Well that's fun! Notice it also adds up the total file size. I find these little savings really add up to keeping me focused on what I'm really trying to achieve (write a tutorial) instead of getting caught up in minutiae. Kate
Monday, April 05, 2010
I am so looking forward to seeing New Orleans for the first time. I am pretty sure this is my tenth Tech Ed North America. I have two sessions, one for native C++ developers and one for managed developers who want to use Windows 7 features. No surprise if you read my blog regularly, I suppose.
The C++ talk is called Modern Programming with C++0x in Microsoft Visual C++ 2010 and the abstract reads: Why wait for the C++ committee to finish the specification when you can enjoy
much of the power of C++0x today! C++0x, the next C++ standard, is almost upon
us and it contains the most important updates to the language since the mid-90s.
It even accepts the existence of multiple threads for the first time in the
history of the language. Needless to say, these new features bring more
expressiveness and power to the native C++ developer. Visual Studio 2010 has
added support for some of these key features in order to enable these modern
programming techniques. This session clarifies what features are in Visual C++
2010 and what is yet to come. It illustrates how new constructs such as lambda
expressions enable better use of existing libraries and how your code can be
simpler, safer, and faster all at the same time. If you are itching to show off
how C++ is one of the coolest languages on the planet, this talk is for you!
The Windows 7 one is The Windows API Code Pack: Add Windows 7 Features to Your Application and the abstract is: Accessing new Windows 7 features is a challenge from managed (.NET) code. The
level of interoperability required is out of reach for many developers. The
Windows API Code Pack for the Microsoft .NET Framework is a sample library you
can use in your own projects today that provides access to new user interface
features (taskbar jumplists, libraries, sensor platform, and more) as well as
"behind the scenes" features that make your applications more aware and
responsive (restart and recovery, power management, and more.) Discover a
shortcut to Windows 7 development for Microsoft Visual Basic and Visual C#
programmers and get started today.
Registration is open, so plan to be there! Kate
Saturday, April 03, 2010
I've been accumulating a ton of links relevant to Windows 7 development, so let's use some of them up: Mmmm, I feel much more caught up now. Kate
Sunday, March 28, 2010
I've mentioned before how Windows 7 Boot-to-VHD makes working with betas so much better for me. In fact just last week I built a new VHD image to do something new with the RC of Visual Studio 2010. It took a few hours off and on, while I was puttering around the house, to install Windows, install Visual Studio, install Office, install the zips of code that someone had sent me to test, install Camtasia, and so on. I didn't begrudge the time, but I was trying to set up something very specific for a test. If you'd just like to play around a bit and see what all the fuss is about, I bet you would like it if someone made a VHD for you and you could just download it and use it. Well Presto! Brian Keller has done just that. And he hasn't just installed Visual Studio on it, but a whole pile of hands on labs, the sample data and configuration that the labs need, and so on. In fact it's three VHDs depending on your virtualization tool - Hyper-V, Virtual PC 2007, or Windows 7 Virtual PC. If you're getting excited about the run-up to launch and starting to ask "oh, is there good stuff in this version of Visual Studio?" then this is a really simple way to get yourself closer to seeing for yourself just how much good stuff there is. Have fun! Kate
Friday, March 26, 2010
One of the things I did during my break from blogging was to start creating content for Pluralsight. Is there anyone who hasn't heard of Pluralsight? An amazing group of people who want to help everyone learn how to develop on Microsoft platforms. They offer in-classroom training and also a rapidly growing online collection of videos and tutorials called Pluralsight On-Demand! that lets you learn what you want on the spot. Rather than just "here's a one hour video on topic X" it's all set up with searches and indexes to take you straight to the piece you want when you're in a searchy mood. It's really nicely done. Pluralsight is a very MVP-positive group (and RD-positive too, though we're rarer) and has more than a few MVPs on the technical and management team. During the MVP Summit they announced that all MVPs and RDs get a free standard subscription to the entire Pluralsight On-Demand! training
library. That's a heck of a deal and if you're eligible, you should sign up now. I have one how-to reference video published at the moment, on taskbar overlays (icons and progress bars) in Windows 7 with Code Pack. There will be more Kate
Wednesday, March 24, 2010
Today is Ada Lovelace Day, a day to celebrate the women of software. I've blogged about it before, and it seems like a good springboard to get started again. There's a nice post over on Toronto Girl Geek Dinners, too. I have been trying to go to an event there for at least 6 months, maybe a year - seems it's always on a day I'm out of town or otherwise unavailable. April 5th might work out - I hope it does. What have I been doing for the last almost-4-months? Working hard. Speaking, mostly on Windows 7 things. Planning future speaking gigs. Writing code - real code - in VB, C#, and yes, C++. Some using STL and some using MFC as it happens. Project managing, which can be many times more satisfying than coding but also many times more frustrating. Tweeting (yes, I did - and I tweet personal stuff as much as technical stuff so if you don't care for that you don't need to feel obliged to follow me.) Publishing videos. All of these things will get blog posts of their own over the next little while. Stay tuned! Kate
Saturday, November 28, 2009
I've wanted one of these since I saw it on Steve Clayton's blog (twice). And now I have one - lucky me.
One of the reasons I'll use a big mouse (compared to the gosh-that's-tiny notebook style) is the magnify button on the side. Just as I usually don't want to get off the keyboard to use the mouse to, say, save my document, I don't want to get off the mouse and use the keyboard to zoom and stop zooming when I'm presenting. I had a nice Microsoft mouse a few years back but the magnify button wouldn't work with the beta of Vista I was using and I ended up letting someone else use that mouse. So I'm super happy that the magnify button on this mouse works just beautifully with Windows 7. Happy presenter. Kate
Tuesday, November 24, 2009
Pete Brown has a terrific two part series on sensor programming in Windows 7. Part 1 has a link for where to get the board, and fills you in on the new architecture. Lots of helpful links and screenshots here, including one to Pietro Bambrati that includes some changes to the racing game sample to make the accelerometer work and one to his video showing you how to install and test it. Part 2 starts with this nice summary of your options as a developer:
There are three different ways you can use the accelerometer API. You can, of
course, go directly against the COM API and generate your own wrappers and
pinvokes. You can use the managed wrappers provided in the SDK, or you can use
the Windows API Code Pack which includes support for the sensor
API and a number of other Windows 7-specific enhancements. In this case, I decided to use the code pack in concert with WPF 4. Hard to argue with that! Pete has written an AccelerometerJoystick you can use in any "controller" situation - and be sure to think beyond just games!
Definitely read and watch, and let Pete and Pietro save you some time!
Kate
Sunday, November 22, 2009
I saw this on Scott Hanselman's blog: It's three little meters - memory, CPU, and Disk IO. Each has a jump list with the obvious tasks - starting Task Manager, for example. It's really simple to do (read the code yourself) thanks to Code Pack.
What will you do over a weekend with it? Kate
Friday, November 20, 2009
It's time for another release of the Windows® API Code
Pack for Microsoft® .NET Framework. Yay! This is a pretty small release (which is why the version just went from 1.0 to 1.0.1) with some bug fixes, performance improvements, and more documentation and samples. It's getting a little attention
- Yochay gives the excellent advice to "consider this library as if you wrote it yourself, as if it is your
own code" and reminds you that while it's "the closest thing to an “official” managed API for Windows", it is not a supported product you can call somebody for help with.
- Mahmoud, who's actually running a Code Pack blog (though I think both Yochay and I have more Code Pack posts).
- Sasha, like me a friend of the Code Pack, also has a summary of Yochay's PDC talk - you should download and watch it.
- Kevin Griffin wrote a nice Code Pack article a day before the new version was announced, but all his praise is still valid
If you're already a Code Pack fan, just go get the latest version. If you're not, you should be - it means just a line or two of code to make your application look and behave like a real Windows 7 app. And are you wondering what's next for Code Pack? See why I said to download and watch Yochay's talk?
Kate
Monday, November 16, 2009
Nice blog post from Scott Guthrie while I was getting ready for Tech Ed Europe. It has a whole laundry list of good stuff in WPF 4, but what jumped out for me was the Windows 7 light up content.
What can you expect? Jumplists (items and tasks), icon overlays and progress bar, thumbnail buttons, thumbnail clipping, all of it. Nice. Kate
Thursday, November 12, 2009
The second-last day is drawing to a close and I am getting tired. At Tech Ed Europe I actually attend sessions as well as preparing for my own and attending the various dinners and get-togethers. Throw in some attempt to do actual work rather than pressing pause on all my other projects for a full seven days, and there isn't much time for sleep.
Yesterday was my Code Pack session, featuring the mysterious disappearing slides. Some of you may have noticed a little consternation on my part when I came back from the first demo. Here's what happened. I prepared my slides for this talk following the schedule the organizers asked for, and actually uploaded them in October to be prepared for the attendees. Then one night, just as I was falling asleep, I decided I wanted to add slides that highlighted the actual code in each demo that was specific to the taskbar or the overlay or whatever. The next day, I did just that and I uploaded the deck again. When I got to my room for the tech check, I ran through the deck on the room machine and - hey! my new slides are not in that deck! So I went back to the speaker room (which is about a mile away) and gave them to the nice "powerpoint team" that sits there waiting for all the speakers who ignore the schedule and work on their slides while on the plane. I heard them on the radio pushing the slides to the room.
An hour before my talk, I got to the room, waited while someone else did a tech check, then got set up. I paged through the "new" deck - and the code slides weren't there! Everyone remembered getting new ones from me yesterday. But they weren't there. I pulled a USB stick out and copied the deck from my laptop to the room machine.
And yet, when I did the talk moments later - they still weren't there! Did I double-click the old deck instead of the new? Did I maybe dream the entire thing? Who knows. But here they are now, attached to this post. Interleave these into the deck you got from CommNet, one after each demo. One more day of Tech Ed... one more day of sessions and meeting people. Kate
codeslides.pptx (372.92 KB)
Sunday, November 08, 2009
An auspicious start to my Europe trip - a jam-packed plane means an "op-up" (operational upgrade, meaning Air Canada decided it was in their best interests to put me in Business Class for free and let someone else have my vacated economy seat). A lovely transit in Munich (probably my favourite airport to change planes in) and a pretzel in the lounge, along with some fantastic coffee, helped me convince my body it was 8am, not 2am. (Sleeping on a lie-flat bed for about 5 hours of the 8 hour flight helped with that too.) Landing in a town that's buzzing with anticipation - there's Windows, "life without walls" and then there's life without this wall - is getting me pepped up. Bring it on! Kate
Friday, November 06, 2009
I was lucky enough to be asked to demo some Windows 7 features at a dinner hosted by Sarah Vingoe (she's on twitter, women.ca, and she blogs) in Toronto. We had some super cool hardware including two large all-in-one multitouch systems and a cute little netbook.
Sue Borden, Microsoft Canada's senior marketing manager for the
Windows consumer division, was at the dinner as well, and she showed me a super cool feature called Play To. It takes a tiny bit of setup, but here's what it does. Imagine you're in the living room on the couch with your laptop. There's some music you would like to listen to, but you don't want to use your tinny little laptop speakers when you're at home. Thing is, the music is on your laptop, not on the living room PC that's hooked up to the nice speakers. So imagine this - you open media player on your laptop, right click the song or album, and choose Play To. A cascading menu appears showing eligible other machines, you pick the living room one, and the music from your laptop comes out of the speakers on the machine you chose. Isn't that fun! I like it. The setup is basically that on the other machine (which needs to be Windows 7 or compatible hardware) you have to turn on media streaming and then give permission to let other people send you media. All the gory details are here. Check it out. Kate
Wednesday, November 04, 2009
My three favourite Windows 7 features are the taskbar, default printers network-by-network, and boot to VHD. That's cheating really because "the taskbar" covers a lot of ground - jumplists, previews, previews with buttons in them (pausing media player, closing anything), notifications, and progress bar overlays. As you can see by all those links, I've already blogged most of those features - and most of my Windows 7 category is taskbar-relevant. But I haven't yet blogged about boot to VHD and I really need to. The rise of VPC over the last few years has made such a huge difference for me and my tribe. Whether it's a safe place to put a pre-beta (typically the uninstall instructions for CTPs and private builds are "format your C: drive") or a carefully configured TFS or Sharepoint setup, a virtual PC is a great place to play or to demo a technology. The only downsides are performance, and sometimes access to hardware peripherals or networking. Boot to VHD fixes those two downsides, and it's better than having a separate laptop or a slide in/out hard drive (a solution I used years ago on the only laptop I've ever met with that capability.) Not only does it weigh a whole lot less than a separate hard drive , you can access the "host" hard drive while you're booted over to the guest. That means I can work on a demo or presentation and leave the powerpoint or the demo script on my "real" drive and edit them from the guest. The only downside is that it is boot to VHD. Not "put the host machine to sleep and then bring up the guest machine." So you have to be prepared to close all the apps you have open, which for me can take some doing. But that's the only problem. How to do it? I followed the nice clear instructions by Adrian Kingsley-Hughes. Print them out, because you're not going to have access to your machine while you're doing this. Scott Hanselman has a similar set of instructions, but they're not identical and I didn't follow them myself, so if you want to, just remember like he says "This is advanced and may hurt you, your computer, or your cat" so don't complain to either of us if something bad happens. He has nice pictures and some links to useful references too. If you really want to wander into "Danger Will Robinson" territory, take a look at Jon Galloway's post which covers the whole "wait, what about activating my copy of Windows?" story. I'm just ignoring that myself since most of these virtual machines are going to live for a month or so. If you're running Windows 7 Ultimate, and you ever install beta or pre beta software, or otherwise ever use a virtual machine, learn how to do this. You won't be sorry. Kate
Tuesday, October 27, 2009
I mentioned a long time ago that I have tweaked Windows 7 to my own preferences - the taskbar is 2 or 3 rows high, but I don't combine and I never hide labels. And until recently, I always used small icons. But while preparing both my Tech Ed Europe talk and my launch party demo, it annoyed me that I didn't get the icon overlays. These are incredibly helpful - better than icons in the system tray, balloon tips, focus stealing popups, toast, or other notification techniques. I mentioned to someone that I got them maybe once when I first installed, but never again since. Then just as I said that, I had a thought. A quick search confirmed it - you don't get overlays if you have small icons. And overlays are so useful, I've switched to large icons so I can have them. Not just while demoing, but for my regular life. In the top row I don't have any new mail and I'm available on Messenger. In the middle row, new mail has come in so the Outlook 2010 icon has an overlay. In the bottom row, I'm away on Messenger. It's a very compact way to present notifications. So from now on, large icons for me! Kate
Sunday, October 25, 2009
It's true, I signed up for a Windows 7 launch party. So did Chris Dufour. But I didn't have people over to sit on the couch and eat cake while I showed them the cool stuff in Windows 7. We just tossed an hour or so of demo at the start of a user group meeting. I had a one-page demo script which I've put as an attachment on this post. I think different default printers for different networks and a "recent/frequent" jumplist on the Windows Explorer in the taskbar were the most popular features. We also had swag! Here's a picture of mine: Chris had a similar pile, and some books and such as we usually do, so each attendee (and we had a lot more than usual) left with something - mostly with one of those tote bags. I should have held one back to use on my next grocery trip. Aren't they surreal? After my demo (everything in the mini script, though probably not in that order, followed by boot to VHD) Chris took over and led us through CSLA for "real" part of the meeting.
Nice to see the group back in action, and hope to see plenty of folks there next month! Kate
demo.docx (16.42 KB)
Friday, October 23, 2009
Sunday, October 11, 2009
While rehearsing some talks recently I was playing around with my desktop background. I've used a shot from my Bermuda vacation for a long time, because it cheers me up if I am feeling stressed. But I enjoyed having some local "autumn colour" shots on there too. Windows 7 has a "desktop slideshow" feature that changes your background every 30 minutes and I'm going to use that for a while ... though I might add my pink beach image to the rotation. Thing is, I don't want to rotate through iconic US pictures, lovely though they are. That's why I was pleased to read, on How-To Geek, how simple it is to activate themes for Canada, Australia, South Africa, and Great Britain. The Canadian wallpapers really are lovely: I think there should really be a prairie one in there too, but I'm not complaining. Give them a try! Kate
Saturday, September 19, 2009
Jeff Barnes has published a wonderful array of material to his Sky Drive: You can read his description and get the link on his blog. If you have the Windows 7 training kit, you may recognize a lot of this, but if you're just starting to think about developing for Windows 7, this is one way to get started. For others, try my Client Development category. Kate
Thursday, September 17, 2009
Recently, I read an inspiring document. It included these quotes: - “Everything is best for something and worst for something else. The trick is knowing for what, when, for whom, and why.” —Bill Buxton
- “Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.” —Antoine de Saint-Exupery
- “The ability to simplify means to eliminate the unnecessary so that the necessary may speak.” —Hans Hofmann
- “Simple things should be simple. Complex things should be possible.”—Alan Kay
- “Everything should be made as simple as possible, but not simpler.”—Albert Einstein
- “I have only made this letter longer because I have not the time to make it shorter.”—Blaise Pascal
I especially like the Einstein one, which I've used in works of my own. But what's surprising about these quotes is the document where I found them. It's 828 pages long and most of those 828 pages is more like this: - To achieve coolness, start not by thinking about what the technology can do, but by focusing on what your target users really need. Before adding that “cool” feature, make sure there are clear user scenarios that support it.
- When asking a question, use labels that match the question. For example, provide Yes and No responses to a yes or no question.
- Don’t give error messages when users aren’t likely to perform an action or change their behavior as the result of the message. If there is no action users can take, or if the problem isn’t significant, suppress the error message.
Can you guess? It's user interface guidelines. Specifically, the Windows User Experience Interaction Guidelines, brought to my attention by Qixing Zheng, a User Experience Advisor with Microsoft Canada, and available on MSDN as a tree of web pages or for download as a single PDF. And man, are they good! The philosophy behind them really resonates with me. The document starts out very generally, then drills in a bit, then drills in a bit more, then explodes into hundreds of pages of incredible detail about just the right way to use a button or a link or radio boxes or whatever. Here are the headings in a 19-item list that I just love: - Nail the basics
- Design experiences, not features
- Be great at something
- Don’t be all things to all people
- Make the hard decisions
- Make the experience like a friendly conversation
- Do the right thing by default
- Make it just work
- Ask questions carefully
- Make it a pleasure to use
- Make it a pleasure to see
- Make it responsive
- Keep it simple
- Avoid bad experiences
- Design for common problems
- Don’t be annoying
- Reduce effort, knowledge, and thought
- Follow the guidelines
- Test your UI
In the real document, there's a paragraph or so for each of these that flesh it out just a little. But as you read the whole hundreds and hundreds of pages you will see how these 19 concepts are really informing all of it. And I love the courage to stop at 19, a prime number, instead of trying to come up with another one to get a round 20. I'm only quoting the philosophy stuff here but man, there are plenty of technical details like how far apart to space controls, how to design a good ribbon, choosing your button text, working with pen, touch, keyboard shortcuts, and the mouse, when to use menus and toolbars, when your application should take focus, how long tips should hang around before fading away again, and on and on and on. Read it, live it, pass it around. See if you can't use some of the philosphy and design guidance in your web apps too. Kate
Friday, September 11, 2009
There's still time to plan a trip to Boston for the BizSpark incubation week, October 5th to 9th.
As Sanjay blogs, you don't need to be in BizSpark to come - it's an event to help startups learn about Windows 7, how it can make your product better, and how to be a successful entrepreneur. You need to be at least interested in building an app that will include touch, sensor and location, the new taskbar or the new ribbon. That covers a lot of ground! It's a free five day event, though you have to get yourself to Boston and find a place to stay. Up to three people from your firm can attend. Nomination details are on Sanjay's blog, but if you have a BizSpark sponsor you should ask your sponsor to send your nomination to Sanjay. My firm is a BizSpark network partner. Generally speaking, we sponsor our clients - folks we're mentoring - and not people who are contacting us only to get into BizSpark. If you think completely legal free developer software (Visual Studio Team System, SQL, Windows etc) is just the ticket to get your startup started up, you should definitely look into BizSpark. It's a tremendous opportunity. Kate
Wednesday, September 09, 2009
Sasha Goldshtein (not the same as Sasha my MVP lead or for that matter Sasha my nephew - seems some names just follow me around) has another great Windows 7 post and this one features native C++ code for extra fun. It tackles a problem you're likely to run into if you're doing Windows 7 development - what should you use as a toolbar preview if your app has a number of tabbed views? As you probably know IE 8 shows you multiple previews, one for each tab (within reason - I have dozens of tabs open some times and it doesn't show all of them) so you might want the same effect for your application. The idea is that the app looks like this: And the thumbnails look like this: One for each tab. Sasha has provided a pair of blog posts explaining this, and you can download the code from his SkyDrive. Very nice! Kate PS: Want to do it in managed code? Well go get the Code Pack then. Tabbed Thumbnails are handled nicely there.
Thursday, September 03, 2009
Scott Hanselman has done quite a few posts on Windows 7 topics already. But now he's done a lollapalooza! He covers: - The Code7 contest - How to get a trip to PDC and $17,777. Not bad eh? Also covered by Yochay.
- XP2Win7 (aka PhotoView) - I've covered it before and I won't repeat the links from that post. Scott includes a gratuitous underwear shot you're going to love.
- Code Pack - you know it almost deserves its own category here on my blog. Like Scott says, a gold mine of samples in both C# and VB.
- 16 bonus links and the "lightweight" parameter for MSDN.
Speaking of the PDC, they've released a bunch more sessions... it's looking very good. I have to pull the trigger soon on a decision about going straight to the PDC from Tech Ed Europe. It's calling me... What are you waiting for? You need to read Scott's post. Kate
Monday, August 24, 2009
I am pleased to learn that at least one of the sessions I submitted for Tech Ed Europe in Berlin has been accepted: The Windows API Code Pack: How Managed Code Developers Can Easily Access
Exciting New Vista and Windows 7 Features
Accessing new Windows 7 or Vista features
is a challenge from managed (.NET) code. The level of interoperability required
is out of reach for many developers. The Windows API Code Pack for the Microsoft
.NET Framework is a sample library you can use in your own projects today that
provides access to new user interface features (taskbar jumplists, libraries,
sensor platform and more) as well as "behind the scenes" features that make
your applications more aware and responsive (restart and recovery, power
management, and more.) Discover a shortcut to Windows 7 and Vista development
for Microsoft Visual Basic and Visual C# programmers and how you can get
involved. Now comes the logistics fluffle of getting everything booked, telling "my" teams I'm going, and possibly picking up some other talks or panels or whatnot while I'm there. I'm looking forward to it already! I love Tech Ed Europe - it's such a well run show and the other speakers are a delight to spend time with and learn from. The energy is always good and on top of that the destination is fabulous. I adored Barcelona, so now it is time for Berlin to show me what she's got. What a week we've picked to be there! You can still register at a discount. See you there! Kate
Sunday, August 16, 2009
I've mentioned the sensor improvements in Windows 7 a little bit, but they really deserve a good long blog post of their own. Luckily for me, my fellow RD Sondre Bjellås has written it .
This is a handy demo board that does light as well as position (think Wii) with some buttons you can push. Sondre covers where to get the board, where to get the drivers, and a really simple sample app to get you started. Then you're going to want the Windows 7 Training Kit - the Hands On Labs have some fun demos. Check it out! Kate
Monday, August 10, 2009
Of course the most important sessions at PDC couldn't possibly be announced yet. The best are the ones that are TBD in the session list and schedule right up until the keynote. That's how you know something big is going to be announced. Imagine something where just hearing its code name, just knowing who was going to give the sessions, or even a single sentence of description would spoil the whole announcement. Those are the sessions you go to PDC for, so it's a bit like a Christmas present ... you can't know in advance what it will be. But it's a four day conference with a lot of sessions and some of them can be announced in advance. I can see that this year some folks have decided to have slightly more interesting session titles (along with the more traditional titles): - Zero to Awesome in Nothing Flat: The Microsoft Web Platform and You
- Windows Workflow Foundation 4 from the Inside Out
- Windows Identity Foundation Overview
- Windows 7 and Windows Server 2008 R2 Kernel Changes
- Using Classification for Data Security and Data Management
- Under the Hood with Microsoft SharePoint 2010 Programmability
- The State of Parallel Programming
- The DirectX 11 Compute Shader
- Simplifying Application Packaging and Deployment with Microsoft SQL Server 2008 R2
- Petabytes for Peanuts! Making Sense Out of “Ambient” Data.
- Microsoft Visual C++ 2010: The "Accelerated" Way of Building Applications
- Microsoft Unified Communications: Developer Platform Futures
- Microsoft Silverlight Roadmap and Futures
- Microsoft Silverlight 3 Advanced Performance and Profiling Techniques
- Manycore and the Microsoft .NET Framework 4: A Match Made in Microsoft Visual Studio 2010
- Development Best Practices and Patterns for Using Microsoft SQL Azure Databases
- Developing xRM Solutions Using Windows Azure
- Developing .NET Managed Applications Using the Office 2010 Developer Platform
- Developer Patterns to Integrate Microsoft Silverlight 3.0 with Microsoft SharePoint 2010
- Data Programming and Modeling for the Microsoft .NET Developer
- Building Applications for the Windows Azure Platform
- Automating “Done Done” in the Dev-to-Test Workflow with Microsoft Visual Studio Team System 2010
- Accelerating Applications Using Windows HPC Server 2008
My favourite title in there is definitely "Manycore and the Microsoft .NET Framework 4: A Match Made in Microsoft Visual Studio 2010" but there are other contenders for sure. As for the topics themselves, I think many of us have still not given concurrency/parallelism/manycore the attention it deserves, and all of us are guilty of compartmentalizing what we learn about so I bet you have probably ignored something (Silverlight, or SharePoint, or Azure, or the full power of VSTS). That means these sessions alone will make us better devs. If these titles are enough to get you signed up, do it now while you can get a $500 (US) discount - from $2095 for the whole conference (except workshops) down to $1595 until Sept 15th. Wait till Labour Day to start bugging your boss about it and the discount will be gone, plus the plane tickets will be more expensive. (Oh, if you're a student or teacher, you pay only $595, which gives you an astonishing way to get head and shoulders above those around you.) There are also some seriously intelligent workshops scheduled: - Getting the most out of Silverlight 3
- Patterns of Parallel Programming
- Developing Quality Software using Visual Studio Team System 2010
- Architecting and Developing for Windows Azure
- Microsoft Technology Roadmap
- Software in the Energy Economy
- Developing Microsoft BI Applications - The How and The Why
Four of those seven workshops are being given by RDs, meaning you'll get real world experience along with the technical product knowledge. What a way to get caught up on something you weren't paying attention to! Going to conferences is getting harder and harder to justify in this climate. But that doesn't mean you stop going to conferences - it means you only go to those that are relevant to your work and offer amazing value (content, people, atmosphere, and otherwise-unavailable bits) in return for your registration fee, travel, and time away from work. The PDC offers just that for devs on the Microsoft stack. It's the only conference I've ever paid my own money to get to. Be there! Kate
Saturday, August 08, 2009
Code Pack, or Windows® API Code
Pack for Microsoft® .NET Framework to use the official name, has hit 1.0 with the RTM of Windows 7 and is now available for your downloading and coding delight. Yes, two registered trademarks in the name, but still technically not a product. It's the most useful not-a-product I know. The mission statement, if you will, of Code Pack is: The Windows® API Code Pack for Microsoft® .NET Framework provides a
source code library that can be used to access some new Windows 7 features (and
some existing features of older versions of Windows operating system) from
managed code. These Windows features are not available to developers today in
the .NET Framework.
The parenthetical in that description is referring to Vista features like Restart and Recovery and Network Awareness, among others. If you've been playing along throughout the beta period of Windows 7 you probably have three questions: What's in 1.0 that wasn't in 0.9? - Shell Search API support.
- Drag and Drop functionality for Shell objects.
- Support for Direct3D and Direct2D interoperability.
- Support for Typography and Font enumeration DirectWrite APIs.
Will my 0.9 stuff work with RTM or should I get 1.0? - You should get 1.0 because it has some bugfixes in it.
Can I use 1.0 on a machine running the RC? - Probably, but no guarantees.
To me the biggest thing in this 1.0 release is this: - The Code Pack also contains sample applications built using this library. Each
sample has a C# version and a VB.NET version and has its own solution file.
That's right. VB samples in 1.0 of something. Thanks for noticing . I am such a huge Code Pack fan (and have had a small hand in its birth) so this is just a wonderful summit to have reached. We've had over 24,000 downloads of Vista Bridge and the pre-release versions of Code Pack, so I am confident a lot of people are able to access Windows 7 features from managed code a lot more easily than they expected to. Kate
Thursday, August 06, 2009
If you like to learn how to do things from material that is longer than blog posts, and videos don't work for you, then you probably still buy books. Here's one you might be interested in: Authors, in case you can't quite read it there, are Yochay Kiriaty, Laurence Moroney, and Sasha Goldshtein. I am often tempted to link to every post Yochay makes - they are detailed, and useful, and crammed with more links. If you're developing for Windows you should be reading his blog and that's that. I read Sasha's blog regularly, too, and he is constantly coming across things I would never have thought of. I may not need that information that day, but reading it makes me a better developer. Both of them give attention to both managed and native code for extra points from me. Laurence is more a Silverlight guy, but I'm going to read his blog for the next little while anyway. I haven't seen a preview of the book yet, but it's due Sept 30th, and you know the content will be good. A pound and a half of developer good stuff :) Kate
Tuesday, August 04, 2009
OK, technically you can't upgrade from XP to Windows 7. But that is what the nice guys at Language Log call nerdview. You can't click a button in the install process that has Upgrade on it and come back later to find that you are now running Windows 7. But you can follow a series of steps that takes you from your current XP installation full of applications and pictures and mailbox and IE favourites and desktop wallpaper and all that jazz, and end up with a Windows 7 installation full of all the same stuff. Well, not your applications, but all your data and your settings. That feels like an upgrade to most people, and if the applications they use are free (Messenger and other downloadable clients) or they have the installation materials and they only use 3 or 4 apps (say, Office) then this is a really simple process to follow. Scott Hanselman has all the details complete with screenshots and instructions. Me, I'm going to repave. In fact I never fully paved when I went to RC - I've been using Remote Desktop to get to other machines around the office that have Visual Studio etc installed. That was mostly because I'd been through two hard drive failures in as many months and was suspecting the controller was wonky. This drive has lived long enough that I'm willing to install stuff on it now, so there's plenty of installing in my future :) Kate
Wednesday, July 15, 2009
Finally, XP2Win7 is released! I've been watching this one for a long time. It's designed to show off both Windows 7 features and development good practices. The same binaries behave differently on XP and on 7 - on 7 it lights up and shows 7 features like the taskbar or libraries support, as well as Vista features that never got the attention they deserve like Restart and Recovery.
The application itself is a photo viewer and that makes it a natural fit for hooking into libraries, search and organize, and the preview system. It has an intuitive jump list on the taskbar:
It also uses the new Sensor support, Aero glass effects, trigger-started services for backing up images when a USB key is inserted, MMC and Powershell integration, the new Event Tracing for Windows (ETW) and so much more. This will be your roadmap to Windows 7 development. Of course all the code is available, as well as a simple MSI if you'd just like to play with the application a bit and understand what Windows 7 has to offer.
Get your copy and start learning and exploring!
Kate
Saturday, July 11, 2009
Remember that post by Aaron Margolis I linked to about launching a non elevated app from an elevated one? I mentioned that he'd left the managed version of his code as an exercise for the reader. Well Sasha Goldshtein has taken up that challenge and written the managed code. Not only that, he's added it to his UAC Helpers project on CodePlex, a collection of code that helps you work with UAC. Nice! Kate
Saturday, June 27, 2009
I sure do love using the Windows 7 taskbar. (I might have blogged a few times about it already.) I have completely internalized the habit of right-clicking on a running app (or a pinned icon for a non-running one) to open a recent document - whether that app is Word, Notepad, PowerPoint, or whatever. I right-click any Messenger conversation to change my status, and I close instances right from the taskbar preview window. I wish Outlook would give me 5 or 6 jumplist items, like New Message and New Appointment, and I really wish Visual Studio would give me some options too. I am looking forward to new releases that will harness this intuitive way of getting users closer to the files they want to open or the things they want to do.
If you want to put taskbar support into your application, and you're not really a video kind of person, perhaps an MSDN Magazine article will do the trick? Yochay and Sasha should be familiar to my readers - you know these guys know their stuff. The article covers both native and managed development, and concludes with this summary:
In this article, we have explored some features of the Windows 7 taskbar, such as application IDs, thumbnail toolbars, overlay icons, progress bars and jump lists. The Windows 7 taskbar provides a clean, sleek launch surface that strongly benefits users. Integrating into this surface will be a primary goal for any application developer for Windows 7.
Using the native Win32 APIs or the managed Windows API Code Pack provides you with a differentiating opportunity to light up your applications on Windows 7. Bear in mind that the taskbar is the first thing users see after logging on to Windows, and you'll want your application to be pinned to their taskbar.
I completely agree. Give it a read.
Kate
Thursday, June 25, 2009
The Build a Better App site is all about applications. They've gathered tutorials, videos, and useful libraries for folks who are building client applications. You'll see some old friends of mine on the main page - Code Pack, Tim Huckaby's recent guidance paper, and so on - along with plenty of things I haven't linked to from this blog. But there's more, like profiles of some of the people whose work is on the site (love the fish, Tim) or videos showing the Windows Forms to WPF converter in action, Code Pack demos, and so on. Speaking of videos, Build a Better App has their own channel on YouTube, as well. Jono Wells is twittering on behalf of the site, and blogging too.
If you were at Tech Ed USA, you probably saw the Build a Better App team - they had a colourful presence and fun stickers and clings. There's a slideshow of some of the "better app requests" from attendees and while I doubt anyone will be coding a cloak of invisibility any time soon, there were some pretty cool requests in there.
Take a look around, and if you want to submit some content for the site, let me know and I'll connect you to the right people.
Kate
Sunday, June 21, 2009
Some simple truths about elevation (as in UAC):
- A process, once running, cannot elevate itself. You are launched elevated or not.
- A non elevated process can launch an elevated one. The easiest way is to make a separate exe and embed a manifest, then launch it with ShellExecute.
- An elevated process, once running, cannot "drop back down" to being elevated. As in the first bullet, you are launched elevated or not.
There are some incredibly complicated ways to launch an elevated process but I don't use them because they are incredibly complicated. But you might have noticed there's a symmetry problem there. Can an elevated process launch a non elevated one? My first answer would be "it doesn't matter, because you shouldn't." My paradigm is that your core app should be non elevated, if at all possible, and if it has one or two admin-ish features, those should be refactored into a separate manifested exe that is launched (from a UI component decorated with the shield), does its stuff and gets out.
However, a case can be made for having some sort of admin app that wants to leverage some other installed application, like Internet Explorer, that could possibly be using a malicious plugin or the like. This admin app would be smart to do its leveraging with a non elevated instance of that application. So how can you do it? Well, according to Aaron Margosis, it's a seven step process in native code. Managed code is left as an exercise for the reader.
If you care, now you know how to do it. And even if you don't care, the symmetry is restored.
Kate
Monday, June 15, 2009
Version 0.9 of the Windows API Code Pack for the Microsoft .NET Framework was released June 11th. This version works with the RC, adds a number of exciting new Windows 7 features, and also incorporates many of the Vista Bridge features as well. (I posted earlier about the different versions of Vista Bridge and Code Pack.) Not only that, but it features VB samples as well as C# ones! You can also see some videos of the functionality in action.
You just won't believe how easy Windows 7 development is from managed code using the Code Pack until you give it a try. Expect to see more releases as the year goes on, and keep talking to the team on Code Gallery.
Kate
Saturday, June 13, 2009
Early this spring I delivered several sessions of training for Microsoft. It was for ISVs who wanted to get rolling on Windows 7 as quickly as possible. It's good material that covers a mix of managed and native development to take full advantage of new APIs, new features, and new power in Windows 7. It relies on the Windows API Code Pack and some custom-written wrappers for Windows 7 functionality that isn't in Code Pack at the moment. And now it's available to anyone who wants it.
If you couldn't come to one of the courses I taught, consider this the next-best thing.
Kate
Saturday, May 16, 2009
I have a collection of USB drives in my laptop bag, as I suppose we all do, and recently I wanted to use one to give someone some files. This wasn't a temporary hand-it-over-they-copy-get-it-back scenario, so I wanted a pretty much empty drive. I found one with only 3 files on it, but the bad news was one of the files was called ReadyBoost.sfcache. That means at some point I had put the drive into my machine and told Windows 7 it could use it to speed up my machine. That's a good thing, and I'm a ReadyBoost fan and all that, but I wanted to use the drive for files and it was pretty much all filled with the cache file.
I tried deleting it, but no go. I tried ejecting the drive and putting it in again so I could say no if I was asked about using it, but I should have realized I hadn't been asked earlier when I put it in so not surprisingly I wasn't asked this time either. A little searching revealed the trick. Put the drive in, open My Computer, right click the drive and choose Properties. Go to the ReadyBoost tab. Presto!
Check "Do not use this device", click OK and tada - the cache file disappears and I have my drive back.
Kate
Tuesday, May 12, 2009
Daniel Kornev took a look at Code Pack and went back to the future, recreating some Longhorn WinFS demos from five years ago using Windows 7 technology. What old demos and prototypes can you find and make a modern-day reality?
Kate
Sunday, May 10, 2009
I haven't put the RC on my laptop yet - too close to Tech Ed for me to mess with important stuff - but I liked this summary from Tim Sneath of what an RC means, and what you should be looking at as a developer. Make sure your application runs properly on Windows 7 to start with (and if it runs on Vista, it will almost certainly run on Windows 7), then look at adding goodies to it that take advantage of what the OS has to offer. He even includes a link to Code Pack. Check it out.
Kate
Friday, May 08, 2009
Some people have asked me about the purpose of Vista Bridge now that Code Pack (ok, Windows® API Code Pack for Microsoft® .NET Framework) exists. If you want to use a Vista feature (such as the power management API) you won't find them in Code Pack yet. Vista Bridge is not under active development right now, but you can download and use the wrappers to save time and effort whether you are targeting Windows 7 or Vista. If you run into issues using it on Windows 7, please let the team know using the Discussion tab.
The second question I am getting is about versions. Code Pack 0.8 (no longer available for download) was for build 7000. Code Pack 0.85 (the current version) is for the RC of Windows 7. If you have moved to the RC and something isn't working for you, go and get the latest version because there were a few breaking changes.
Will there be a new version for RTM? Let me just quote from the home page:
Please note that this library is currently a work-in-progress and this release is version 0.85 of this library. The final version of this library will be available around the time of the Windows 7 RTM release. Various features in the library could change between now and final release.
That's pretty transparent, I would say.
Update: 0.8 can still be downloaded. Go to the downloads page and there's a link over to the right.
Wednesday, May 06, 2009
I've made another appearance on DotNetRocks with Carl and Richard. Some links from the show:
And of course, the show itself. I dare you to listen at 1.4 or double speed.
Kate
Tuesday, April 14, 2009
Do you have a Windows application? Are you curious if it will run well on Windows 7? Would you like to try something a little more technical than "install on Windows 7 and see if it runs?" Then you need the Application Compatibility Toolkit. The latest version, 5.5, is now available. There is documentation for it on TechNet to help you get started.
Kate
Wednesday, March 25, 2009
Windows 7 has this neat feature called Libraries. It aggregates together several real folders - perhaps two or three folders on your machine, or perhaps one on your machine and one elsewhere on the network. Within this "virtual folder" you can search, sort, and otherwise explore a large collection of files without having to worry about which real folder houses them. The usual examples given are your photos or your music, but I could also see it being handy for those "project folders" that every developer keeps on the working box, and the shared project folder that some (but not all) of the documents have been copied to. If you set up a Library that represents all those folders, you can read through the documentation without getting caught up in whether a particular file is on the project share, developer A's machine, or developer B's machine.
This blog post by Vinod Unny (a fellow RD) presents another cool use for Libraries - as a temporary creation to help you copy and paste from many different folders (perhaps all those individual developer ones) into another (perhaps that project share.) What a nice explanation!
Kate
Sunday, March 15, 2009
Whenever a new OS or major application is released, there's a gap between when people want to start interacting with the functionality and when the .NET Framework supports that interaction. That's only natural - the framework release cycles aren't synced to the OS release cycles. This happened before with Vista, and is happening now with Windows 7. For Vista developers, the Vista Bridge provides easy access from managed code to the fun stuff like Restart and Recovery, Task Dialog, Power Awareness and so on. Stay tuned for announcements about a similar library for Windows 7. In the meantime some slightly more granular wrappers are available for you to use now, covering Taskbar, Libraries, Sensors, and Multi-Touch. Alon's blog has the details and the links.
Kate
Saturday, March 07, 2009
A lot of applications like to know what version of the operating system they are running on. Sometimes (especially older applications) it's so they can flat-out refuse to run if you're still on, say Windows 98. This is now frowned on, by the way, and if you want a Windows 7 logo you must not refuse to run based on a version check. Other times (and this is bad too) it's as part of some arcane roll-your-own strategy. For example someone I know planned to work out the default hard code paths for user documents (C:\Documents and Settings\ ... vs C:\users\... ) based on OS versions. This is insane! There's already a function you can call that will get you that path, and it works even if the user has changed it from the default.
But there are still legitimate reasons for version checking. If you're using Vista or Windows7 light-up features like the Task Dialog, Restart and Recovery, or Taskbar Jump Lists, you'd better make sure you're on an OS that supports those features. It's pretty easy from managed code: just call System.Environment.OSVersion.Version.Major and System.Environment.OSVersion.Version.Minor. From native code, GetVersionEx() does the same job. Then you have to do some comparing. That's where things can get weird.
For example, a huge incompatibility bucket for Vista was applications whose code checked that the version was exactly 5.1. If not, it would pop up a message box saying it only ran on XP SP2 or better. I've seen these apps in the wild and I just can't keep from laughing. The error message itself says "or better", and that was presumably the intent, but the code is checking for equality. The magic of >= fixes this "incompatibility" bug in the code, and often these applications don't need any other fixes to make them work on newer OS versions. (That's why the logo people frown on refusing to run. How can you know you won't work on a later OS that doesn't exist yet?)
Even if you grasp the magic of >=, comparing major and minor versions can bite you. Larry Osterman shows us this code:
// Example in C#.
internal bool SupportsTaskProgress() {
if (System.Environment.OSVersion.Version.Major >= 6) {
if (System.Environment.OSVersion.Version.Minor >= 1) {
return true;
}
}
return false;
}
He rightly points out it will return false if the version is 7.0, or 8.0, or any other .0 that's larger than 6. (Yes, Windows 7 returns 6.1 for the version #, that's a long story and well covered elsewhere.)
Version checking is hard. If you can, use a library that does it for you. Vista Bridge, for example, not only wraps up cool new OS features for easy access from managed code, it also does some checking to see if the feature is there for you or not. Don't reinvent wheels. Also, check for the feature rather than the OS if you can. Larry discusses this in his post for Taskbar features. Any feature you plan to use, you should know how to check for. I hope to post some more links and examples on this soon.
Kate
Friday, February 27, 2009
Ronan Geraghty has an interesting blog, full of topics that interest me, with lots of BizSpark, WPF, Windows 7 and client development content. In a recent entry he explains that getting the Windows Logo on your software product is going to be a lot easier for Windows 7. Instead of submitting your application to a third party for testing, you can test it yourself and get certification without paying someone else.
Why would you want to certify your product and get the Windows Logo? I can think of at least three reasons:
- The certification process may raise your quality bar by imposing some constraints on you that you were planning to skip.
(Have a clean, reversible installation; Install to the correct folders by default; Support Multi-user sessions; etc.) That may feel like a drawback to some, but for those who wanted to put these features in, the logo program may be a good reason to have them.
- There may be some customers somewhere who are more likely to buy something with the logo on it. There certainly are none who are LESS likely to buy because you took the time to get certified.
- Having a logo'd product gets you a competency in the Partner Program and makes you a Certified Partner, which comes with a suite of benefits you're sure to want.
So making it easier to get the logo is nothing but good news. Follow Ronan's links for more details.
Kate
Thursday, February 19, 2009
Another Dan Griffin sample you might want to look at is the EC2 Console. I think his description from the first post in that category sums up his approach very nicely:
The purpose of the EC2 Console, like the other ones, is to demonstrate an attractive (WPF-based), novel, and useful application on Windows. In this case, we chose as our vehicle a helpful control panel for Windows developers who are new to cloud computing and would like to experiment with Windows Server, ASP.NET, and MS SQL on Amazon’s EC2 platform.
As it happens, Amazon already has an EC2 console (currently in Beta). But we’re going to differentiate ourselves from that in two ways. First, our EC2 Console will be specific to developers targetting Windows, and we can automate many administration tasks given that assumption. Second, our console (again, a WPF client app) will exhibit the kind of superior usability that is very difficult to achieve via the browser.
Client applications have many more advantages than just offline availability. Here's an application that's only useful when you're online, but is going to be a client application anyway. Follow along and see why.
Kate
Wednesday, February 18, 2009
Dan Griffin is working on some samples for client development and blogging his progress as he writes them. His SPOS sample combines workflow with access to local hardware (in this case, a fingerprint reader) to create an application where you could approve, say, purchase orders with a fingerprint swipe. It's a good example of the kind of application that is better as a local client application than something web-based and browser hosted.
He's created a Codeplex site where interim releases are appearing, and a blog category where you can follow his progress, read his musings on what fingerprint reader to buy, and so on. This is a sample designed for you to use in your own work, so follow along and see if it can help you.
Kate
Thursday, February 12, 2009
Yochay has been very busy talking to Channel 9 and preparing Windows 7 material for developers. Here's a blog post from early January that lists some taskbar related videos you will want to watch. Screenshots of the taskbar really don't convince you of how much easier it is to use.
Still I can't keep from trying. Let me show you how I close things now. Imagine I have (among other things) a Notepad instance open on my machine. The "old way" to close it, if it doesn't have focus, is to right-click the icon on the taskbar and then choose close. You can still do that in Windows 7:
That's a right click, let go, move the mouse, left click. We know how to do that, and it's a ton less mouse moving than left click, wait while window paints, go on all the way up to the top right, click the red X. But I like this even better:
If I just move the mouse (no clicking) over the icon of one of the Notepad instances, they all show their thumbnails. One of them (the one I moused over) has a little red x showing in the thumbnail. Without clicking, if I move the mouse onto the thumbnail and pause a moment, I get the "peek" where that window appears (in case I can't tell from these tiny little thumbnails) and everything else goes transparent. If I click the little red x in the thumbnail, the instance closes. It's less clicks, it's noticeably faster and smoother.
These are the sorts of things that are making me so glad I put Windows 7 on the prime laptop. I would not go back!
Kate
Wednesday, February 11, 2009
Jennifer Marsman points out her favourite new Windows 7 feature - different default printers when you're on different networks. To bring up the dialog she shows in her blog post, bring up the Devices and Printers dialog (I do that by clicking Start and typing printer), then select a printer. That will give you a printer-related toolbar:
And yes "no network" counts as a network, so I can have the XPS writer as my default when I'm not on the network (if you've ever accidentally clicked a Print icon on a toolbar and then had to wait over a minute while the search for the printer timed out, you'll know why my default isn't really a printer at all) but I can have a useful default printer when I am on the network. Fantastic, and thanks Jennifer for telling us about it!
Kate
Tuesday, February 10, 2009
There's been a reasonable amount of blog talk about the removal of the "quick launch" area from the Windows 7 taskbar. What isn't coming across in the blogs I read is how there is an across-the-board attempt to make the taskbar more useful. Sure, making it easy to flip focus to a background window to see how it's doing is a good idea. But saving you from having to flip focus is a better idea, right? Take a look at this:
It's a piece of my taskbar, and the icon with the green on it is an Internet Explorer download dialog. That's a green overlay progress bar going across it. Here's another a few minutes later:
This is really, genuinely useful. And if you're thinking that getting your own applications to take advantage of this will require you to learn a bunch of API calls and the like - think again! If you have a progress bar control on screen, the overlaying in the taskbar will be done for you automatically on Windows 7. How's that for fun?
Kate
Sunday, February 08, 2009
I had read that Windows 7 did the perf calculations differently than Vista, so I thought I would compare them. I took a picture of my settings as part of the whole "back up everything three different ways" process before the upgrade (me? burned before? ya think?) and here's what it said:
After the upgrade, it said:
So the same conclusion, but drawn from different numbers. Bottom line is I could mess around with this laptop and it would be faster, but it works for my day to day use. And things feel zippier on Windows 7. Sleeping and waking up, for sure. And finding the files I want ... but that's about jump lists and previews.
Kate
Saturday, February 07, 2009
Well, I did it. I put the Windows 7 beta on the laptop I use day in and day out. This machine had Vista on it, and the upgrade was utterly painless. All my software was still there and still working fine when the install was complete. The only glitch was that my built-in touchpad has become invisible in some way. This means I can't configure it to be less sensitive, which in turn means I was "clicking" a lot when I didn't mean to. I disabled it completely (using the 1980s-style UI of the edit-your-settings-on-boot experience) and other than having to carry a mouse with me when I take the laptop somewhere, there's been no other impact.
First impressions: I use jump lists a lot. Enough for a separate blog post. I like everything I noticed, except the default large-icons, no-text, group-everything setting on the taskbar. I fixed that:
(I've cropped it so it doesn't stretch the page)
I've said it before and I've said it again ... you can't really learn a product if you kick up a VPC once in a while but live your life in a different product. Windows 7 is stable enough to live in, and living in it will show what it's really like soon enough. I'm liking what I'm living.
Kate
Sunday, February 01, 2009
While I was in Redmond I met Alon Fliess, who like me is a C++ MVP and is exploring Windows 7 (and Vista before it) from a native point of view as well as a managed one. About two months ago he mused about the "rebirth" of C++ in these times, not just because some of those operating system APIs are easier to get to from native code, but also because of new native capabilities (the continued MFC updates, the native Web Services library, the concurrency services) that just keep being added to the arsenal available to C++ programmers. (He has some helpful links in the blog post - you could also search through here if you like.)
I think it's a good point. If you know C++, now's a good time to use it. If you don't, then hang around (at least virtually) with those who do - we can point out some cool things. And thanks to the magic of interop, wrappers, and C++/CLI, perhaps we can make some of those cool things a little easier to get to from managed code.
Kate
Sunday, November 16, 2008
Also on Code Gallery, in addition to the Vista Bridge, you can find an interesting bit of guidance for those developing Windows 7 applications. This is 43 pages of "what is special about Windows 7" written for developers. Curious about touch and multi touch? Ink? The new taskbar, ribbon, jump lists? Libraries? How to handle previews and thumbnails for your file type? Wondering what Windows Web Services are and how they differ from WCF? (quick answer - WCF is managed, Windows Web Services is native C++ - expect more on that from me when life calms down a little.) It's all in here, with plenty of screenshots. From here you will know where you want to drill more deeply, and you will know the names of features, which is usually key to figuring out how to use them.
http://code.msdn.microsoft.com/Win7DeveloperGuide is a good starting point, and you can join discussions and so on. The Downloads tab will get you the document in Word or XPS format.
Kate
Sunday, November 09, 2008
These are fun:
I got them from Knom's Developer Corner, a consistent source of goodness.
Wondering why they appear to be on my desktop? Because even in Vista gadgets can be on your desktop. Just drag them there. If you use Windows+D or Alt-Tab your way to the desktop you won't see them, but bring up the sidebar with Windows+Space and the gadgets you put on your desktop will wake up too. Neat trick I learned from a Windows 7 guy .
Kate
Monday, November 03, 2008
More PDC goodness.
Steven Sinofsky is the senior vice president for the Windows and Windows Live Engineering Group at Microsoft. He was awesome in the Day 2 keynote. Then he walked down to The Big Room and did a half hour Open Spaces talk with attendees. I recognized fellow RDs Tim Huckaby and David Yack among them. The sound quality varies but the recording is well worth watching to see how comitted he is to the Engineering 7 blog and to communicating with developers.
Then there's Joey deVilla. I've been reading his personal blog for ages and his technical blog once in a while - he was an open source guy so it wasn't always relevant to me. I love his sense of humour and spirit of community. I was delighted to learn that he would replace the departing Jean Luc David (our loss is Redmond's gain.) While at PDC, he interviewed Don Box, Miguel de Icaza, John Lam, Phil Haack and some of the .NET Micro Framework team. Great ways of learning some of what happened at PDC and getting to know Joey a little better.
But he wasn't the only one! John Bristowe was also busy with the camera. He interviewed Joel Semeniuk (another RD) and some people from Windows Home Server. This is a product I am hearing a lot of praise for that I really should install on a spare machine.
I love these videos because they start to capture some of the non-session parts of the conference. If you're wondering why on earth you would go to a conference and not go to sessions, look at these conversations. Also look in the background at the other conversations and interactions. Face time is why we all come to the same place. Sessions are a bonus.
Kate
Tuesday, October 28, 2008
An astonishing thing happened to me on the afternoon of Day 1. I went to the room for the "Parallel Programming for C++ Developers in the Next Version of Microsoft Visual Studio" talk, and the redshirt guarding the entrance said "the room is full you have to go to the overflow room." I tried logic with her "It's a C++ talk! It's can't possibly be full!" but she chose to believe her own eyes. So I walked the hundred miles or so to the overflow room, which itself became full. The audience really enjoyed seeing how simple it can be to take advantage of multicores using templated functions. Lines and lines of boilerplate goo disappear into a library instead of your code, which means people might actually do this. Nice stuff.
Having learned my lesson, I lined up immediately for "Microsoft Visual C++: 10 Is the New 6." The room filled up just as fast:
I don't think I had heard Boris Jabes present before. He was very good indeed. The slide you see in this picture lays out the mission statement for "Dev10", the next version of Visual Studio, as far as the C++ team is concerned: Make VC10 the most productive IDE for native development. Then he proved it to us. Since it was the last talk of the day, people stayed with questions for a long time afterwards. I really enjoyed listening in on those.
Tuesday started with a keynote that really impressed me. Azure is amazing but the gritty details are not there yet. But Windows 7 - it's on the hard drive! It's real! So they showed it to us. Then they started talking about client development. Ray pointed out a number of advantages of writing a Windows application instead of (or as part of a suite that also has) a web app.
I loved the Windows 7 demo. Lots of features there I really want right now. I love Vista, but this is even nicer. And I hear the stability is great already so you could really use it. Julie plugged the Engineering 7 blog I've plugged myself.
Scott Guthrie said C++ five times. I don't think I've ever heard him say it once before.
Don't worry, he talked about managed code too. You may think of ScottGu as "the web guy" but he gave client development in general, whether C++ or WPF, some serious love in this talk. Great announcements too - grid control for one!
Want one more inside joke explained? (I just love the RD alias for this sort of stuff!)
David Treadwell's shirt had 0x007FFF embroidered on it. Think of it as 00 7F FF. RGB. Go try it in some HTML. Then think back to Day 1.
Update: better picture of the shirt by Angus Logan. Subtle-as-a-brick demo of the colour by Steve Clayton.
Missed the keynote? Based on the URL to day 1, try http://channel9.msdn.com/pdc2008/KYN02/
Kate
Friday, October 24, 2008
Here's a brand new blog, written by someone I work with from time to time at Microsoft. Well, that's who's name is in the URL, but the first post has talk of "we" so perhaps it's a team effort. The mission is
...this blog will be a “one stop shop” on the road to get yourself familiar with what Windows 7 has to offer for developers and how you can “Light-Up” using Windows 7 features in your application.
Nice. I'm reading!
Kate
Friday, October 10, 2008
Well, I already knew I was an outlier. And I knew that my number of open windows was part of that eccentricity. But just how much? According to the Engineering Windows 7 blog entry on the taskbar, pretty much everyone peaks at less than 15 open windows, and most people at less than 10:
Here's my taskbar at a typical moment:
It's routinely three high. I've never gone to four high, but I have had more open than that. 40 doesn't seem unusual to me (that's 42 there) and I can find my way around in them easily enough. I am a big-time Alt-tabber of course.
Curious how the taskbar, launch pane, start menu, and so on will be different in Windows 7? Want to understand why some features are the way they are (hint: customers are all different, except in the ways they are the same)? Read the blog!
Kate
Thursday, October 09, 2008
The Engineering 7 blog is really something. These guys are sharing a TON of information about how they decide what will and won't be in the next version of Windows, how it will work, how they will know they're done, and so on. I enjoyed this summary of UAC issues - what they learned from Vista and what they intend to do in Windows 7. Interesting points:
- Intuitively we all know the number of UAC prompts you see should go down over time, because once you have things installed and configured, you don't run the admin apps any more. But they also go down because you used to run old versions of apps that weren't UAC-aware (think Visual Studio 2005 and having to run it elevated most of the time, especially for ASP.NET work) but later you install a newer version that is aware and doesn't have to run elevated (Hello, Visual Studio 2008!)
- The number of different applications that cause UAC prompts "in the wild" is down to about one-fifth of what it was when Vista first released. That's a great success for persuading software vendors to get new versions UAC-aware.
- They plan to add information to the dialogs in Windows 7 so you will understand more clearly what you are being asked to approve.
Can't wait to get to the PDC and learn even more about what Windows 7 will have in store for us!
Kate
© Copyright 2024 Kate Gregory
Theme design by Bryan Bell
newtelligence dasBlog 2.3.9074.18820 | Page rendered at Monday, December 02, 2024 9:08:13 PM (Eastern Standard Time, UTC-05:00)
|
On this page....
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|
24 | 25 | 26 | 27 | 28 | 29 | 30 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 1 | 2 | 3 | 4 |
Pluralsight Free Trial
Search
Navigation
Categories
Blogroll
Sign In
|