Chris Pietschmann

husband, father, hacker, entrepreneur, futurist, innovator, autodidact

NAVIGATION - SEARCH

Add System Menu Items to WPF Window using Win32 API

Here's the simple code necessary to add some custom menu items to your applications System Menu within a WPF application. If you're not familiar, the System Menu is the menu that shows up if you click on the apps icon in the upper left or if you right click the app in the taskbar. [More]

Add System Menu Items to a Form using Windows API

This is something I used to have a code snippet for in VB6, but I haven't needed to do this in a while so I never wrote up an example in .NET. So, here's the simple code necessary to add some custom menu items to your applications System Menu. If you're not familiar, the System Menu is the menu that shows up if you click on the apps icon in the upper left or if you right click the app in the taskbar. [More]

Calculate Distance Between Geocodes in C# and JavaScript

There are times when I need code to calculate the distance between two geocodes (Lat/Long points). I don't need it very often and until now I didn't have a code snippet that I could jus copy and paste. I was searching and found Rob Conery's LINQ and Geocoding post. It's an interesting post and he includes a sample of how to use Lambda expressions in C# 3.0 to calculate the distance between two geocodes in Miles. I decided to copy his code snippet and make sure it works in .NET 2.0 and also conv... [More]

ASP.NET: Use VB.NET and C# within the App_Code folder

When I was creating my new blog site (this site your looking at), I chose to write it in C#. I had a problem with the App_Code folder because I had some code in VB.NET code and some C# code I needed to put in there. I didn't want to rewrite my VB.NET code in the App_Code folder just so I could write the rest of the code for the site in C#. Luckily, the ASP.NET Team had already thought about just this kind of circumstance. They implemented a way to partition the App_Code folder into sub-fold... [More]