views:

2229

answers:

1

Hi there,

I've found this article by Bea Stollnitz and downloaded the source and converted to vb.net. I believe I have my conversion complete, but one thing is still not working as I've tried to get it and pulled too many hairs out. Hopefully someone can help me spot what I'm missing.

Ok, drag & drop works fine in the converted code, I just don't get the InsertionAdorner working in vb.net, I've setup breakpoints in code and all code is being executed, but for the life of me the InsertionAdorner does not become visible. Even the DrawLine functions are being called!

I'm at a loss and I need this in vb.net, the original C# project works just fine, I just can't find out what I'm missing!

Thanks, Scott

A: 

Got it, with the help of Reflector.

The online converter took this code

pen = new Pen { Brush = Brushes.Gray, Thickness = 2 };

and spit out

pen = New Pen()

conveniently leaving out the

pen.Brush = Brushes.Gray
pen.Thickness = 2

and a couple other conversions that I had to fix that were similar.

The converter could of done:

pen = New Pen() With {.Brush=Brushes.Gray, Thickness=2 }

but to play it safe because VS08 only supports that it just left it out..

Problem fixed!

ScottN