Presentation & Demos from C# LINQ Open House

February 18, 2009

Today I presented a Microsoft Open House event focused on C# 3.0 features and LINQ. Thank you all for coming! I have attached the presentation and demos. Note that to make the LINQ to SQL samples work, you must change the connection string appropriately in the app.config file, or pass another one in the NorthwindDataContext constructor. Presentation & Demos

Why 2D Transforms use 3×3 Matrices

February 15, 2009

If you’re working with WPF or other sophisticated graphics framework (e.g. DirectX, OpenGL) you probably know that to create 2D transforms, you build a 3x3 Matrix, either explicitly or implicitly by using classes such as RotateTransform, ScaleTransform or TranslateTransform. it might seem somewhat strange, that for 2D transformations we need a 3x3 matrix: after all, we take an X and a Y and transform them into some X2 and Y2. So, why a 3x3 matrix? Why not just 2x2? The reason has to do with the ability to create a 2x2 matrix that can represent...
16 comments

Non-Square Caption Buttons

February 12, 2009

In the last few months, my Windows captions look something like this: The caption buttons are not square. Someone asked me how I did it… Well, Windows UI (Personalize…, etc.) allows changing the size of the caption buttons, but the width must be the same as the height. To make the caption buttons rectangular, one needs to call the SystemParametersInfo native API. Here’s some C++ code that does what you see here (width = 3 times height): NONCLIENTMETRICS metrics = { sizeof(metrics) }; ::SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof (metrics), &metrics,...
one comment

Upcoming Courses and an Event

February 9, 2009

I’ll be teaching next week (starting from the 16th) a five day course (split) entitled “The C# 3.0 programming language” on .NET and C# fundamentals. On the 18th of this month, I’ll do an open house at Microsoft on C# 3.0 and LINQ (same thing I did a few months back at Air Force house, so if you were there, no need to come again – unless you really like the food). You can register here. On March 1st, I’ll be teaching my Windows Internals class (for developers) on the (obviously) internals of the Windows OS. Mostly...
no comments

Math.Net – Math Library for .NET

February 8, 2009

Recently I was searching for a mathematics library for use in .NET applications and I stumbled upon Math.Net, an open source math library that includes two main components: The first, called Iridium, deals with the basics: numbers, vectors, matrices and the like. The second, Neodym, is a digital signal processing toolkit, containing things like various filters, modulators, time-frequency processing tools and the like. Worth checking out if you’re in the math business.
2 comments