Chris Pietschmann

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


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]

.NET Community: Learn The Current State Of The Platform Before Deciding On Its Future

There has been some discussion lately in the blogosphere and on DotNetKicks around the subject of "What is wrong with the ASP.NET Community?". There has been alot of discussions goin on, and it has really gotten me thinking. Before reading on, please read the following two posts in order. What is wrong with the ASP.NET Community? - by Dan Hounshell The ASP.NET community's only real problem is education - by Jeff Putz Now that you've read the above t... [More]

LinkedIn Group for the Wisconsin .NET Users Group

Here's a link to the Wisconsin .NET Users Group LinkedIn Group I just created. Anyone can join this group on LinkedIn, and it's a nice way to show your affiliation with the WI .NET Users Group within your LinkedIn profile. Also, heres a link to the Facebook group for the Wisconsin .NET Users Group:

PasswordTextBox for Silverlight 2 Beta 2

The standard TextBox control that is built into Silverlight 2 Beta 2 is a bit lacking and is missing alot of features that we have become accustomed to in a TextBox. One of those features is being able to mask the characters being displayed when its used to accept passwords. Here's a small PasswordTextBox control I built that does just that; it masks the characters from being displayed so you can accept passwords like you're used to. Update 6/7/2008 - I just tested this w... [More]

Working with HTML DOM in Silverlight 2 Beta 1 using the Bridge Pattern

Working with the HTML DOM in Silverlight 2 Beta 1 is rather simple and easy to do. However, to my surprise it's a similar experience to working the the HTML DOM from within JavaScript; you have to know the name of the properties to get/set and you don't have the luxury of compile time checking or intellisense. Here an example of creating a new DIV element and setting some of it's properties: [code:c#] HtmlElement myDiv = HtmlPage.Document.CreateElement("div&quo... [More]

Show a MessageBox in Silverlight 2 Beta 1

Since Silverlight is just a subset of WPF, there are alot of things missing. One missing thing I found is the System.Windows.MessageBox. I'm a little puzzled as to why they would have left this out, but I imagine MessageBox's are handled very differently in different Operating Systems. It's probably a little work to get it working on both Mac and Windows, but I hope it gets into the final release. It's not a major feature, but one that is used quite often when developing desktop ... [More]

MIX'08 Session Recordings Now Available Online

The MIX'08 Session Recordings are now available online. So far, its just the recordings from yesterday, but all the recordings for the entire event should be up by Monday. This is really awesome, you can almost attend the event for free online. Go check it out.

Opening Client-Side Files using Silverlight

Silverlight does not have direct access to the local file system for security reasons. However, you can still prompt the user to select a specific file to open using the OpenFileDialog similarly to how you do in .NET. Here's some basic code that demonstrates opening a user specified file using Silverlight 2 Beta 1. This basic example opens up a user specified file, and displays its contents within a textbox. Page.xaml file <UserControl x:Class="SilverlightFileSystemInfo.Page"   ... [More]

Silverlight: Anatomy of an .XAP file

Silverlight 2 Beta 1 just came out this morning, so I started checking it out immediately. I installed the Silverlight Tools for Visual Studio and noticed that when a Silverlight Application is compiled a .xap file is created that contains the application. But, what exactly is a .xap file, and what exaclty is in there? What is an .xap file? A .xap file is basically a compiled Silverlight application. The file is actually a .zip file that contains all the files necessary for the application. ... [More]

MIX'08 - KeyNote Notes of Ray Ozzies talk

I watched the MIX'08 Keynote online this morning, and here are some notes I took.  Notes from Ray Ozzies talk: Some investments will be realized this week: Internet Explorer 8 Silverlight 2 Advertising on the web is expected to grow from $40 billion to $80 billion over the next few years. Social networking is growing and will become an integral part of the web just as familiar as Files and Folders are on the desktop. Web will be used as a hub in using and managing al... [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]