take a look at this sample... it's in C# but that shouldn't be a problem