Windows 8, What Does It Mean to Me?

Well, unless you’ve been hiding under a rock, you’ve probably heard about Microsoft Build conference that happened in Anaheim last week.  It was during this conference that Microsoft finally released details about the successor to Windows 7.  This event is solely developer-focused and, in my opinion, tablet-specific.  It went into a lot of detail about the added APIs and usability changes in Windows 8 to better support tablet and touch-based computers. First off, the new touch-first usability changes are called “Metro” and applications written for touch are called “Metro-style apps”. The term “touch-first” is used because it’s not touch-only.  Metro … Continue reading Windows 8, What Does It Mean to Me?

More on Async Functions

In my last post I showed .Net 1.1 and .NET 2.0 code that performed some asychronous operations.  I then showed the new syntax with “async” and “await” that did the same thing. But, I didn’t detail what’s really going on in the new syntax. If you want to know more about the details of what’s going on, read on.  If you just trust me about the previous code, you don’t have to read on 🙂 When the Click handler is executed it basically executes everything up to the first await and returns.  This allows the UI to be responsive.  The … Continue reading More on Async Functions

A New Asynchronicity Awaits You

The languages team at Microsoft have just announced that both VB and C# are giving first-class citizenship to asynchronous operations. At long last we can cleanly program for asynchronous operations without cluttering up the code with imperative artefacts relating to how the asynchronous operation is being performed. Let’s have a quick look at how we had you might perform an asynchronous operation in .NET 1.x: byte[] readbuffer = new byte[1024]; public void Button1_Click() { WebRequest webRequest = WebRequest.Create(“http://msdn.com”); webRequest.BeginGetResponse(new AsyncCallback(BeginGetResponseCallback), webRequest); } private void BeginGetResponseCallback(IAsyncResult asyncResult) { WebRequest webRequest = (WebRequest)asyncResult.AsyncState; WebResponse webResponse = webRequest.EndGetResponse(asyncResult); Stream stream = webResponse.GetResponseStream(); stream.BeginRead(readbuffer, … Continue reading A New Asynchronicity Awaits You

Drag and drop of control selections onto forms designer toolbox

A while back I blogged about the ability we have in Visual Studio to select text in a text editor and drag it onto the toolbox.  Once on the toolbox you could drag those items back into the text editor to effectively “paste” frequently needed snippets of code into other text files. Imagine my surprise when we didn’t have this ability in the forms designer.  When writing code, it’s a bit specious to want to have multiple copies of hard-coded snippets of code (DRY should come to mind).  But, for forms, the only alternative is to create user controls to … Continue reading Drag and drop of control selections onto forms designer toolbox