C# TcpClient and NetworkStream usage behaviour

It can be confusing at first when developing an application that employs TCP connection implementation of TcpClient, TcpListener and the underlying NetworkStream, because the way data is sent and read may not be what you think it is and the MSDN is not very explicit regarding how it actually works, leaving the developers to fall […]

Hosting WCF In IIS7 With Multiple Website Bindings

In IIS7 (should be similar in IIS6 as well) Manager, you can create a website under Sites with multiple Bindings so that the website root can be accessed by different combinations of host name, IP and port etc. However, if you have a WCF service that you intend to host in this website, there are […]

WrapPanel not wrapping as ListBox ItemsPanel

When using a WrapPanel as the ItemsPanel for a ListBox as such The WrapPanel may not wrap the items as expected. This is because of WPF’s width and height sizing issue. Depending on the type of Panel that the ListBox is contained in e.g. StackPanel, Grid, etc the width of the ListBox will be resolved […]

How to create Visual Studio Setup Project for VSTO add-in

This is written in the context of an Visual Studio 2010 and VSTO Excel add-in, that I created and had to deploy using the setup project after exploring all other options including ClickOnce, Wix, InstallShield and what-not. As it turns out, the Visual Studio Setup Project remains to be the easiest to understand and use. […]

Winforms controls not painting correctly, messed up.

While writing a custom paint routine you may come across a strange phenomenon where some of the controls on the Winforms are not painting correctly or even appearing at times. This is usually due to Control.Invalidate() being called recursively, and the API tries to keep on painting what is important and defers the painting of […]

Flash Player 10 Loader.unloadAndStop()

One of the biggest problem with Flash Player 9 AS3 is that it doesn’t take initiative in cleaning up its mess and you always have to tell it what to do and even so, they do not do it promptly. If the mess doesn’t affect us, we can easy just turn a blind eye to […]

How does VSTO add-in loads

NOTE: This post is written in the context of Excel, but it is the same for all Office VSTO. Application level VSTO load sequence is triggered when the associated Office application starts. The Application looks into the registry under the key: HKCU\Software\Microsoft\Office\Excel\Addins\[Addin Name]\Manifest Workbook level VSTO load sequence is triggered by opening a workbook. The […]